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

Scheduler- response Date Format

1 Answer 129 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Maryam
Top achievements
Rank 1
Maryam asked on 05 Mar 2015, 01:55 PM
Hi,

I use this Kendo scheduler in my project and implement a new service to save events, this service get params as JSON like
this:
{"TaskID":0,"Title":"No title","Start":"2013-06-10T08:00:00.000Z","End":"2013-06-10T08:30:00.000Z","StartTimezone":"","EndTimezone":""
                  ,"Description":"","RecurrenceID":"","RecurrenceRule":"","RecurrenceException":"","OwnerID":1,"IsAllDay":false}

and send back this response:
{"TaskID":12,"Title":"No title","Start":"2013-06-11T08:00:00.000Z","End":null,"StartTimezone":null,"EndTimezone":null,"Description":null,"RecurrenceID":null,"RecurrenceRule":null,"RecurrenceException":null,"OwnerID":null,"IsAllDay":null}

it makes this error on page:
TypeError: e is null c;c++)s=l.fn.events[c],h=k(i,s),h!==n&&(r[s]=gt.getter(h)(t));return a?e.isEmptyObject(r)||a.setOptions(r):a=new ....

I make a fake response like the following text and it works.
{"TaskID":121,"OwnerID":1,"Title":"No title","Description":"","StartTimezone":"","Start":"\/Date(1370937600000)\/","End":"\/Date(1370939400000)\/","EndTimezone":"","RecurrenceRule":"","RecurrenceID":null,"RecurrenceException":"","IsAllDay":false}

the difference -between 2 response- is Date format, I can’t understand what does "\/Date(1370937600000)\/" means? Which Date format is it?

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 09 Mar 2015, 08:37 AM
Hello Maryam,

The pointed format is the default format which the MVC JSON serializer use to format the dates and it's the one which is expected by the Scheduler MVC wrapper, however from the provided information it seems that you are using Kendo UI scheduler. Could you please provide the current scheduler setup that you are using? This would help us pinpoint the exact reason why the scheduler is not parsing the original response from the server.

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