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"
}
}
}
});
jsonpCallbackString?jsonpCallbackStringis not in the documentation I linked above. Pls see my edits.