1
votes

I'm attempting to use the new Kendo Scheduler widget. I have server code generating text/jsonp using PHP for two events but they dont show. Firebug shows me this as the response :-


[{"TaskID":"599","Title":"Test Al's Birthday","Description":"Als birthday bash","Start":"2014-07-16 04:00:00","End":"2014-07-18 04:00:00","RecurrenceID":null,"RecurrenceRule":null,"RecurrenceException":null,"StartTimeZone":null,"EndTimeZone":null,"IsAllDay":"false"},{"TaskID":"598","Title":"test dave bday","Description":"Daves birthday bash","Start":"2014-07-16 04:00:00","End":"2014-07-17 04:00:00","RecurrenceID":null,"RecurrenceRule":null,"RecurrenceException":null,"StartTimeZone":null,"EndTimeZone":null,"IsAllDay":"false"}]

I should have mentioned I used the 'Basic Usage' example and only changed the URL for the read to be my php script. Everything else is the same.


What am I missing, is it the date formats ? I'm using mysql and my select is:

select p.id as TaskID, p.name as Title, p.Description, date_format(p.project_start,GET_FORMAT(DATETIME,'ISO')) as Start, date_format(p.project_end,GET_FORMAT(DATETIME,'ISO')) as End, null as 'RecurrenceID', null as 'RecurrenceRule', null as 'RecurrenceException', null as 'StartTimeZone', null as 'EndTimeZone', 'false' as 'IsAllDay'

I jsut can't see what could be wrong ??

2

2 Answers

0
votes

You response looks like JSON and not JSONP. This is one of the things which may be broken. Try setting the dataType of your transport.read option to "json" instead of "jsonp":

dataSource: {
   transport: {
      read: {
        url: "tasks.php",
        dataType: "json"
      }
   }
}

Other than that the response looks OK. The date format is supported. I created a live demo using local data in the same format as yours: http://jsbin.com/oyIf/2/edit

0
votes

The answer is that in the example there's a field OwnerID and I didn't have that so left it out. I didn't notice that the filter uses it and so stopped it working..