LastLoginTime: { editable: false, type: "date" } // in the data source model
{ field: "LastLoginTime", title: "Last Login", filterable: false, format: "{0:dd/MMMM/yyyy}" } // in the columns collection of the grid
The date in the column displaysThe date in the column always displays as '/Date(1334652996959)/', the json value that comes back from the server. What's up here?
6 Answers, 1 is accepted
Could you verify that you have correctly declared a schema and date type for the field in question. This way the DataSource will try to convert the field value to JavaScript Date object. You may refer to this online demo which uses the DataSource scheme option.
All the best,Rosen
the Telerik team
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
You should make sure that you are using Q1 2012 or later release of KendoUI.
Regards,Rosen
the Telerik team
Hello Ruben,
I'm not sure I understood your question. If you have set the type via the field declaration it should be set. However, the automatic parsing of the string value, if such is used, does not support all of the possible custom date formats. If the date is not parsed and is still shown as a string, then maybe you need to set a custom parse function via the field declaration in which to convert the input string to a Date instance.
If you continue to experience difficulties please open a separate support request in which to provide as much information about the issue and your setup as possible. A small runnable sample will be appreciated.
Rosen
Telerik by Progress