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

Kendo Scheduler Datasource date format

1 Answer 441 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Markus
Top achievements
Rank 1
Markus asked on 10 Feb 2015, 02:26 PM
Hi

I am loading (trying to) data from my db for the scheduler.

http://dojo.telerik.com/uNupe

I cannot find any documentation of how the date format should arrive from the database to be displayed properly.

In above example the Date() function is used like this:

dataSource: [
    {
      id: 1,
      start: new Date("2013/6/6 08:00 AM"),
      end: new Date("2013/6/6 09:00 AM"),
      title: "Interview"
    }
  ]

I do now want to create data on the fly so how to format the date so Kendo Scheduler understands? Preferably YYYYMMddhhmmss - 20130606142023

I have also seen that in some of your examples you plug in data with date strings like this:

    "Start": "/Date(1370847600000)/",
    "End": "/Date(1370851200000)/",

Those appear on the 10th of June but I cannot figure out how?

Thanks














1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 12 Feb 2015, 11:37 AM
Hello Markus,

There is no exact format that one should follow. The DataSource's schema.model option allows custom parse function to be specified, which can parse the incoming strings using the parseDate method. The same can be achieved using the schema.parse option as well, however it works on all fields instead on just a specific one.

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
Markus
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or