protected function newClientDate($value, $meta)
    {
        $format = Utility::get($meta, "format");
        $type = Utility::get($meta, "type");
        if ($format == null) {
            switch ($type) {
            case "date":
                $format = "Y-m-d";
                $toFormat = "Y,(n-1),d";
                break;
            case "time":
                $format = "H:i:s";
                $toFormat = "0,0,0,H,i,s";
                break;
            case "datetime":
            default:
                $format = "Y-m-d H:i:s";
                $toFormat = "Y,(n-1),d,H,i,s";
                break;
            }
        }
        //The (n-1) above is because in Javascript, month start from 0 to 11
        $date = \DateTime::createFromFormat($format, $value);

        if ($date) {
            return "new Date(" . \DateTime::createFromFormat($format, $value)->format($toFormat) . ")";
        }
        return "null";
    }