'getTimezoneOffset' of null

10 posts, 0 answers
  1. jon
    jon avatar
    9 posts
    Member since:
    Jun 2010

    Posted 02 Oct 2014 Link to this post

    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.


  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3747 posts

    Posted 06 Oct 2014 Link to this post

    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!
     
  3. M Aslam
    M Aslam avatar
    1 posts
    Member since:
    Dec 2015

    Posted 03 Jan 2016 in reply to Georgi Krustev Link to this post

    is there any solution to this issue?
  4. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3747 posts

    Posted 06 Jan 2016 Link to this post

    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!
     
  5. Andrew
    Andrew avatar
    21 posts
    Member since:
    Dec 2015

    Posted 15 Feb 2016 Link to this post

    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.

  6. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3747 posts

    Posted 17 Feb 2016 Link to this post

    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!
     
  7. Andrew
    Andrew avatar
    21 posts
    Member since:
    Dec 2015

    Posted 22 Feb 2016 Link to this post

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

     

     

  8. Christophe
    Christophe avatar
    14 posts
    Member since:
    Jul 2018

    Posted 30 Apr 2019 Link to this post

    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

     

  9. Dimitar
    Admin
    Dimitar avatar
    801 posts

    Posted 02 May 2019 Link to this post

    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.
  10. Christophe
    Christophe avatar
    14 posts
    Member since:
    Jul 2018

    Posted 02 May 2019 in reply to Dimitar Link to this post

    thanks Dimitar, 

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

Back to Top