I am having trouble getting a date to parse with the Kendo Grid. I am using Knockout-Kendo to assist with the data-bindings.
The date-string in the json response that I am attempting to parse looks something like
2012-03-13T00:00:00
.
The column definition for the Kendo grid contains format: '{0:MM/dd/yyyy}'
which seems to work on another grid that isn't using Knockout-Kendo to parse the exact same date string.
I have created (well re-using from a separate question) a jsFiddle that demonstrates the issue fully here.
I want to stay away from row-templates only because I haven't figured out how to correctly set them up in a knockout binding, but I am completely open to alternative or "just correct" suggestions.
In case you are returning data as an Array you need to specify datetype
It is possible to specify a
dataSource
in the configuration. You do need to still specify adata
key, so the binding know that you are passing options and not just the data directly.Can look like:
Updated fiddle here: http://jsfiddle.net/rniemeyer/EUFxg/
try formatting the date in the kendo grid this way
columns.Bound(x => x.LastUpdateDate).ClientTemplate("#= kendo.toString(LastUpdateDate, \"MM/dd/yyyy hh:mm tt\") #");