Uncaught TypeError: Cannot read property 'getTimezoneOffset' of null.
From another post, the suggestion was made to use DateTime2(7) for both the Start and End Dates. I have that and the error still happening.
The actual event does get saved, but the event form stays open and i have to refresh the screen. All very messy. Any help would be appreciated.
9 Answers, 1 is accepted
In general, the start and end values of the event are required. Could you verify whether the serialized events have start and end values? If you are receiving this error most probably some of the fields in question is null. If the problem still persists I would ask you to send us a simple test project, which replicates the problem. This will help us to narrow the problem down and advice you further.
If the start/end dates are not parsed correctly, which depends on your schema.model configuration, then the widget will throw the aforementioned error. Basically, you will need to ensure that the widget is setup correctly.
Still no acceptable answer?
I am experiencing the exact same error. I have defined:
Additionally I confirmed with a database browser there are no meetings with start_time or end_time as undefined, null, or an empty string, or even any type other than Date(). Everything on the calendar works, but when I hit the save button KendoUI complains about getTimezoneOffset of null, pointing only to minified files, and the page must be reloaded. The meeting does save, however.
All other CRUD endpoints are hooked up and work correctly. Even a decent workaround would be acceptable.
I won't get my hopes up though, since this question has been open since October of 2014.
As I mentioned in my previous reply, the most common reason for the "getTimezoneOffset of null" error is incorrectly passed/set date values.
I would not be able to continue with the investigation, and hence to answer the questions, without sending us a repro demo. That being said, please send a simplified repro demo that demonstrates the issue. Thus we will be able to debug the code and find the cause of the issue.
I fixed this issue by forcing my date fields to dates with the new Date(date) syntax in the parse function.
Facing the exact same issue.
reading the datasource from my API is working fine.
I edit/update an event and save it to my API update funciton. The dates and timezone are fine and well store in database.
then the scheduler throw this error and block with the edit popup open.
Does the Update API have to return anything particular to the scheduler?
jQuery.Deferred exception: Cannot read property 'getTimezoneOffset' of null TypeError: Cannot read property 'getTimezoneOffset' of null
at Object.a [as apply] (https://kendo.cdn.telerik.com/2019.1.220/js/kendo.all.min.js:26:12306)
at a (https://kendo.cdn.telerik.com/2019.1.220/js/kendo.all.min.js:83:10914)
at init.data (https://kendo.cdn.telerik.com/2019.1.220/js/kendo.all.min.js:83:9926)
at init._accept (https://kendo.cdn.telerik.com/2019.1.220/js/kendo.all.min.js:28:2239)
at l (https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js:2:29375)
at c (https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js:2:29677) undefined
The described error could be thrown if the edited event start and end times have incorrect or no values set. Could you verify that this is not the case?
In case the issue continues to persist, I would suggest to open a separate support ticket, where you could provide additional information regarding the exact implementation. We will then be able to review the exact scenario in details and assist you further.
i managed to fix it. the format of my json return was not compliant with what is expected.