I suggest you ...

custom date format in (editable) grid column

When you configure a grid date-column with a custom format, the value configured in 'format' is parsed using JSON.parse. This requires the use of double quotes for both keys and values.

var a = "{0:dd/MMMM/yyyy}"; // example from docs
JSON.parse(a); // SyntaxError: JSON.parse: expected property name or '}'

var b = '{"0":"dd-MM-yyyy"}';
JSON.parse(b); // jey!

However, if you use the latter, the generated template goes fubar with the message:

"Invalid template:' ... <td>${kendo.format("{"0":"dd-MM-yyyy"\}",theDataField)}</td> ... "

This makes sense when you look at the quote mismatch..

41 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    RoccoRocco shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Robert McGillRobert McGill commented  ·   ·  Flag as inappropriate

        Had a similar problem using validation/regular expressions in list tempaltes. What solved it for me was using a backslash '\' for escape characters.

        I would try something like {\"0\":\"dd-MM-yyyy\"}

      Feedback and Knowledge Base