Kendo ui Scheduler- JSON数据不显示

时间:2016-02-08 15:10:58

标签: javascript json kendo-ui kendo-scheduler

我试图使用Kendo Scheduler来显示3个不同的日历。调度程序本身正在正确显示,但未填充/显示数据。我是JavaScript的新手,我似乎无法弄清楚问题出在哪里。页面上没有错误,看起来它可以看到JSON文件,但只是没有显示数据。

非常感谢任何帮助!!

以下是代码:

[{"TaskID":1,"OwnerID":1,"Title":"AA & SPG Paid","Description":"AA: 1/1/2016 - 1/31/2016    SPG: 12/1/2015 - 12/31/2015","StartTimezone":null,"Start":"\/Date(1453334400)\/","End":"\/Date(1453420800)\/","EndTimezone":null,"RecurrenceID":null,"RecurrenceRule":null,"RecurrenceException":null,"IsAllDay":"false"},
{"TaskID":2,"OwnerID":1,"Title":"AA & SPG Supplemental","Description":"AA: 1/1/2016 - 1/31/2016    SPG: 12/1/2015 - 12/31/2015","StartTimezone":null,"Start":"\/Date(1453334400)\/","End":"\/Date(1453420800)\/","EndTimezone":null,"RecurrenceID":null,"RecurrenceRule":null,"RecurrenceException":null,"IsAllDay":"false"},
{"TaskID":3,"OwnerID":1,"Title":"Approve Payments","Description":"AA: 1/1/2016 - 1/31/2016    SPG: 12/1/2015 - 12/31/2015","StartTimezone":null,"Start":"\/Date(1452038400)\/","End":"\/Date(1452124800)\/","EndTimezone":null,"RecurrenceID":null,"RecurrenceRule":null,"RecurrenceException":null,"IsAllDay":"false"},
{"TaskID":4,"OwnerID":1,"Title":"Approve Payments","Description":"AA: 1/1/2016 - 1/31/2016    SPG: 12/1/2015 - 12/31/2015","StartTimezone":null,"Start":"\/Date(1452124800)\/","End":"\/Date(1452211200)\/","EndTimezone":null,"RecurrenceID":null,"RecurrenceRule":null,"RecurrenceException":null,"IsAllDay":"false"},
{"TaskID":5,"OwnerID":1,"Title":"Sent to Edison AA & SPG Supplemental","Description":"AA: 1/1/2016 - 1/31/2016    SPG: 12/1/2015 - 12/31/2015","StartTimezone":null,"Start":"\/Date(1452211200)\/","End":"\/Date(1452297600)\/","EndTimezone":null,"RecurrenceID":null,"RecurrenceRule":null,"RecurrenceException":null,"IsAllDay":"false"},
{"TaskID":6,"OwnerID":2,"Title":"Approve Payments","Description":"Pay Period: 1/1/16 - 1/15/16","StartTimezone":null,"Start":"\/Date(1453161600)\/","End":"\/Date(1453248000)\/","EndTimezone":null,"RecurrenceID":null,"RecurrenceRule":null,"RecurrenceException":null,"IsAllDay":"false"},
{"TaskID":7,"OwnerID":2,"Title":"Approve Payments","Description":"Pay Period: 1/1/16 - 1/15/16","StartTimezone":null,"Start":"\/Date(1453248000)\/","End":"\/Date(1453334400)\/","EndTimezone":null,"RecurrenceID":null,"RecurrenceRule":null,"RecurrenceException":null,"IsAllDay":"false"},
{"TaskID":8,"OwnerID":2,"Title":"Foster Phone In","Description":"Pay Period: 1/1/16 - 1/15/16","StartTimezone":null,"Start":"\/Date(1453334400)\/","End":"\/Date(1453420800)\/","EndTimezone":null,"RecurrenceID":null,"RecurrenceRule":null,"RecurrenceException":null,"IsAllDay":"false"},
{"TaskID":9,"OwnerID":3,"Title":"Residential Refresh","Description":"Refresh: 9/1/15 - 11/30/15|Final Refresh for Sept.","StartTimezone":null,"Start":"\/Date(1453248000)\/","End":"\/Date(1453334400)\/","EndTimezone":null,"RecurrenceID":null,"RecurrenceRule":null,"RecurrenceException":null,"IsAllDay":"false"},
{"TaskID":10,"OwnerID":3,"Title":"Residential Pay Run ","Description":"Pay Period: 12/1/15 - 12/31/15|December 2015","StartTimezone":null,"Start":"\/Date(1452038400)\/","End":"\/Date(1452124800)\/","EndTimezone":null,"RecurrenceID":null,"RecurrenceRule":null,"RecurrenceException":null,"IsAllDay":"false"},
{"TaskID":11,"OwnerID":3,"Title":"Residential Pay Run ","Description":"Pay Period: 12/1/15 - 12/31/15|December 2015","StartTimezone":null,"Start":"\/Date(1452124800)\/","End":"\/Date(1452211200)\/","EndTimezone":null,"RecurrenceID":null,"RecurrenceRule":null,"RecurrenceException":null,"IsAllDay":"false"},
{"TaskID":12,"OwnerID":3,"Title":"Residential Refresh","Description":"Refresh: 9/1/15 - 11/30/15|Sept. thru Dec. 2015","StartTimezone":null,"Start":"\/Date(1452211200)\/","End":"\/Date(1452297600)\/","EndTimezone":null,"RecurrenceID":null,"RecurrenceRule":null,"RecurrenceException":null,"IsAllDay":"false"}]

然后还有一些JSON数据:

content

1 个答案:

答案 0 :(得分:0)

数据似乎不正确,我做了一个例子。

我认为问题在于开始日期和结束日期,它们并不一致。

var YourData =[{"TaskID":1,"OwnerID":2,"Title":"Bowling tournament","Description":"","StartTimezone":null,"Start":"\/Date(1370811600000)\/","End":"\/Date(1453420800)\/","EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false}]; 

  var NewData =[{"TaskID":1,"OwnerID":2,"Title":"Bowling tournament","Description":"","StartTimezone":null,"Start":"\/Date(1453334400)\/","End":"\/Date(1370822400000)\/","EndTimezone":null,"RecurrenceRule":null,"RecurrenceID":null,"RecurrenceException":null,"IsAllDay":false}]; 

YourData不起作用,但NewData正在运行,我只是测试第一项。

这里的例子。

http://dojo.telerik.com/uTOQe

希望这个帮助