kendo scheduler : TypeError: Cannot read properties of null (reading 'getTimezoneOffset')

1 Answer 380 Views
Data Source Scheduler
Monica
Top achievements
Rank 1
Iron
Monica asked on 04 Dec 2022, 12:53 PM | edited on 04 Dec 2022, 01:00 PM

Hi,

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?

Thanks,

 

Neli
Telerik team
commented on 15 Dec 2022, 06:43 AM

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:

e.success($.extend(true, [], scheData));

Here you will find the modified Dojo example.

Regards,

Neli

Monica
Top achievements
Rank 1
Iron
commented on 20 Dec 2022, 03:31 PM

Thanks Neli, that did it

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 08 Dec 2022, 06:50 AM

Hello Monica,

I will need a little bit more time to review the issue and the provided example. I will get back to you with more information once I have something to share.

Thank you very much for your patience.

Regards,
Neli
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Data Source Scheduler
Asked by
Monica
Top achievements
Rank 1
Iron
Answers by
Neli
Telerik team
Share this question
or