This is a migrated thread and some comments may be shown as answers.

'getTimezoneOffset' of null

9 Answers 1727 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
jon
Top achievements
Rank 1
jon asked on 02 Oct 2014, 03:34 PM
Whilst trying to create a scheduler event, i am getting the following error:
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

Sort by
0
Georgi Krustev
Telerik team
answered on 06 Oct 2014, 11:47 AM
Hi jon,

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.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
M Aslam
Top achievements
Rank 1
answered on 03 Jan 2016, 05:37 PM
is there any solution to this issue?
0
Georgi Krustev
Telerik team
answered on 06 Jan 2016, 08:03 AM
Hello M Aslam,

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.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Andrew
Top achievements
Rank 1
answered on 15 Feb 2016, 09:46 PM

Still no acceptable answer?

I am experiencing the exact same error. I have defined:

start: {
                            type: "date",
                            from: "start_time"
                        },
                        end: {
                            type: "date",
                            from: "end_time"
                        },

 

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.

0
Georgi Krustev
Telerik team
answered on 17 Feb 2016, 10:07 AM
Hello Andrew,

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.

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Andrew
Top achievements
Rank 1
answered on 22 Feb 2016, 07:52 PM

I fixed this issue by forcing my date fields to dates with the new Date(date) syntax in the parse function.

 

 

0
Christophe
Top achievements
Rank 1
answered on 30 Apr 2019, 08:56 AM

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 https://kendo.cdn.telerik.com/2019.1.220/js/kendo.all.min.js:28:1078
    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

 

0
Dimitar
Telerik team
answered on 02 May 2019, 06:27 AM
Hello Christophe,

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.

Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Christophe
Top achievements
Rank 1
answered on 02 May 2019, 08:03 AM

thanks Dimitar, 

i managed to fix it. the format of my json return was not compliant with what is expected.

Tags
Scheduler
Asked by
jon
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
M Aslam
Top achievements
Rank 1
Andrew
Top achievements
Rank 1
Christophe
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or