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

    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?

  2. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2194 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.

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