This is a migrated thread and some comments may be shown as answers.

Grid MVVM binding to date string from ajax request

1 Answer 93 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Victor
Top achievements
Rank 1
Victor asked on 21 Oct 2013, 12:08 PM
Hi!

We are trying to bind declaratively to date columns represented like "/Date(1325289600000)/". This works when creating the grid in code and setting column type to "date", but not declaratively. This is shown in the DtStart column. As shown in the DtStop column though this does work when the date value is a real date as opposed to a string.

It is possible to create a template for the column using for example "#=kendo.dateParse(DateFrom)#", but the datepicker will still not "understand" the value.


The full example can be seen here: http://jsfiddle.net/Gkgg9/3/

Thanks for any help!
/Victor

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 23 Oct 2013, 12:19 PM
Hello Victor,

I would recommend you to use the kendo.parseDate method in order to convert the JSON string containing the date to a proper JavaScript Date object, as shown in this example.

Regards,
Alexander Popov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Victor
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or