0

I'm struggling with the kendo ui transport property for schedules. The following snippet worked as expected:

    $.ajax({
        url: 'https://myurl',
        dataType: 'jsonp',
        jsonpCallback: "myCallback",
        contentType: 'application/json',
        type: "GET"
    });
    
    function myCallback(result){
        
     $("#scheduler").kendoScheduler({
            date: new Date("2022/03/01"),
            startTime: new Date("2022/03/01 07:00 AM"),
            height: 600,
            views: [
                "day",
                { type: "workWeek", selected: true },
                "week",
                "month",
                "agenda",
                { type: "timeline", eventHeight: 50}
            ],
            timezone: "Etc/UTC",
            dataSource: result      
        });
    }

As the kendo ui tutorials mentioned there should be a shortcut for definition above; but the result of the following code snippet is a calendar with no events.

     $("#scheduler").kendoScheduler({
            date: new Date("2022/03/01"),
            startTime: new Date("2022/03/01 07:00 AM"),
            height: 600,
            views: [
                "day",
                { type: "workWeek", selected: true },
                "week",
                "month",
                "agenda",
                { type: "timeline", eventHeight: 50}
            ],
            timezone: "Etc/UTC",
            dataSource:         {
                batch: true,
                transport: {
                    read: {
                        url: "https://myurl",
                        dataType: "jsonp"
                    }
                    
                }
        
            }       
        });
3
  • What is jsonpCallbackString? Commented Mar 1, 2022 at 18:40
  • @ShawnOrr You are right, the jsonpCallbackString is not in the documentation I linked above. Pls see my edits. Commented Mar 2, 2022 at 11:42
  • I would look into setting the schema as well. Maybe that is needed in this situation. Commented Mar 2, 2022 at 18:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.