Scheduler- response Date Format

2 posts, 0 answers
  1. Maryam
    Maryam avatar
    1 posts
    Member since:
    Mar 2015

    Posted 05 Mar 2015 Link to this post


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

    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++)[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?

  2. Vladimir Iliev
    Vladimir Iliev avatar
    2206 posts

    Posted 09 Mar 2015 Link to this post

    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.

    Vladimir Iliev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top