What I am trying to achieve:
Have a local array of my objects to be displayed by the scheduler, then I would need to remove some of them, and at the same time insert new ones
When the page first loads, it works ok, as soon as I try to update the underline data source I get the error:
TypeError: Cannot read properties of null (reading 'getTimezoneOffset')
To reproduce, please press the "Update" button. (I have attached a sample) PS: Please note that I am currently using: kendo.2022.1.412 ( I forgot to update the sample, but it throws the same error)
And one more question, for the scheduler then to reflect the changes , do I need to call the scheduler.view? or will it be ok to just trigger the scheduler.dataSource.read()?
//update scheduler var scheduler = $("#scheduler").data("kendoScheduler"); scheduler.dataSource.read(); //scheduler.view(scheduler.view().name) ----> do we really need this?
Thank you very much for your patience.
To avoid the observed behavior and to correctly set the data in the Scheduler second time I would suggest you to clone the data before setting it in the widget:
Here you will find the modified Dojo example.