Problem with scheduler JSON DataBinding

1 Answer 43 Views
Scheduler
Alessandro
Top achievements
Rank 1
Iron
Iron
Iron
Alessandro asked on 24 Oct 2024, 04:30 PM

Hi everyone,

I have problems on binding data from json to Kendo UI for Jquery scheduler, here is my code:

Html/JS


    		$("#scheduler").kendoScheduler({
				timezone: "Europe/Rome",
				ongoingEvents: true,
				editable: false, /*must be read-only*/
				views: [
					{
						type: "month"
					}
				],
				dataSource: {
					batch: true,
					transport: {
						read: {
							url: "/ajax/scheduler-view.php",
							dataType: "json"
						}
					}
				},
				schema: {
					   model: {
						 fields: {
						   id: { type: "number", field: "id" },
						   title: { field: "title"  },
						   start: { type: "date", field: "start" },
						   end: { type: "date", field: "end" },
						   description: { field: "description" },
						   isAllDay: { type: "boolean", field: "isAllDay" }
						 }
					   }
					 }
			});

and here is the JSON:


[{"id":1,"title":"mio titolo","description":"","startTimezone":"Europe\/Rome","start":"\/Date(1729786479)\/","end":"\/Date(1729872879)\/","endTimezone":"Europe\/Rome","isAllDay":true}]

I tryied many ways, but I cannot see the event in the scheduler (that is rendered ok, but empty).

Any suggestion?

Thank you

1 Answer, 1 is accepted

Sort by
0
Alessandro
Top achievements
Rank 1
Iron
Iron
Iron
answered on 24 Oct 2024, 04:49 PM
I forgot to multiply php time() by 1000 before sending to json... please close this thread... sorry
Tags
Scheduler
Asked by
Alessandro
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Alessandro
Top achievements
Rank 1
Iron
Iron
Iron
Share this question
or