B.Harris February 2016

Kendo ui Scheduler- JSON Data not displaying

I'm trying to use the Kendo Scheduler to show 3 different calendars. The scheduler itself is displaying properly, but the data is not being populated/displayed. I'm very new to JavaScript and I cannot seemed to figure out where the issue is. There are no errors on the page and it looks like it can see the JSON file, but is just not displaying the data.

Any help would be greatly appreciated!!

Here's the 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" },
                   

Answers


Marco Palma February 2016

Data do not seem to be correct , I made an example.

I think the problem is with the start and end dates, they are 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, but the NewData is working, I just test with first item.

Here the example.

http://dojo.telerik.com/uTOQe

Hope this help

Post Status

Asked in February 2016
Viewed 2,704 times
Voted 8
Answered 1 times

Search




Leave an answer