javascript - Kendo ui Scheduler- JSON Data not displaying -
i'm trying use kendo scheduler show 3 different calendars. scheduler displaying properly, data not being populated/displayed. i'm new javascript , cannot seemed figure out issue is. there no errors on page , looks can see json file, not displaying data.
any appreciated!!
here's code:
<div id="example"> <div id="team-schedule"> <div id="people"> <input checked type="checkbox" id="fcpi" value="2"> <input type="checkbox" id="rpr" value="3"> <input checked type="checkbox" id="aaspg" value="1"> </div> </div> <div id="scheduler"></div> </div> <script> $(function() { $("#scheduler").kendoscheduler({ date: new date("2016/1/13"), starttime: new date("2016/1/13 07:00am"), height: 600, views: [ "day", "workweek", "week", { type:"month", selected: true}, "agenda" ], timezone: "etc/gmt", datasource: { batch: true, transport: { read: { url: "./calendars/fiscal.json", datatype: "jsonp" } }, schema: { model: { id: "taskid", fields: { taskid: { from: "taskid", type: "number" }, title: { from: "title", defaultvalue: "no title", validation: { required: true } }, start: { type: "date", from: "start" }, end: { type: "date", from: "end" }, starttimezone: { from: "starttimezone" }, endtimezone: { from: "endtimezone" }, description: { from: "description" }, recurrenceid: { from: "recurrenceid" }, recurrencerule: { from: "recurrencerule" }, recurrenceexception: { from: "recurrenceexception" }, ownerid: { from: "ownerid", defaultvalue: "1", type: "number" }, isallday: { type: "boolean", from: "isallday" } } } }, filter: { filters: [ { field: "ownerid", operator: "eq", value: '1' } ] } }, resources: [ { field: "ownerid", title: "owner", datasource: [ { text: "aa & spg pay run", value: '1', color: "#f8a398" }, { text: "foster care phone in", value: '2', color: "#51a0ed" }, { text: "residential pay run", value: '3', color: "#56ca85" } ] } ] }); $("#people :checkbox").change(function(e) { var checked = $.map($("#people :checked"), function(checkbox) { return parseint($(checkbox).val()); }); var scheduler = $("#scheduler").data("kendoscheduler"); scheduler.datasource.filter({ operator: function(task) { return $.inarray(task.ownerid, checked) >= 0; } }); }); }); </script>
and of json data too:
[{"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 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 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"}]
data not seem correct , made example.
i think problem start , end dates, not consistent.
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 dont work, newdata working, test first item.
here example.
hope help
Comments
Post a Comment