DateTimePicker Adds timezone-diff to UTC if min-date equals current date

3 posts, 0 answers
  1. Bastian
    Bastian avatar
    9 posts
    Member since:
    May 2014

    Posted 09 Nov 2015 Link to this post


     I'am using the DTP with angular. The min-date ist set to today at 00:00:00:



       min: new Date(2015, 10, 9),//hardcoded example for today: Date {Mon Nov 09 2015 00:00:00 GMT+0100}

    parseFormats: ["dd.MM.yyyy HH:mm"],

    interval: 15



    No inital value is provided to the DTP, so the DTP has no value after page load. When the user selects a date this occures:

    - if a future day (e.g. tomorrow) is selected the time portion is 00:00:00 (complete: Date {Tue Nov 10 2015 00:00:00 GMT+0100}). Fine, thats assumed.

    - if the date-value is set on the minimal possible day (aka today) the time portion is set to 01:00:00 (Date {Mon Nov 09 2015 01:00:00 GMT+0100}). If the browsers timezone is for example changed to China Standard Time so the time portion is 08:00:00h (Date {Mon Nov 09 2015 08:00:00 GMT+0800 (China Standard Time)}).
    - if the DTP min-value is not set to today at 00:00:00 but to yesterday 23.59.59 all works fine if todays date will be selected: time portion is 00:00:00h.


    Any ideas whtas going wrong? Is it just me? I assume always to get the time portion 00:00:00 if on an empty and fresh initialized DTP the date will be set via the ui. Thanks in advance.

  2. Georgi Krustev
    Georgi Krustev avatar
    3725 posts

    Posted 11 Nov 2015 Link to this post

    Hello Bastian,

    In general, the DateTimePicker widget works with JavaScript Date object. If the time portion is changed unexpectedly, probably you are seeing the built-in browser support for DST change. Mainly, DST change happens in October, hence you probably are seeing this side effect.

    I would suggest you experiment with simple JavaScript Date objects instead of using Date/Time Picker widgets. If the problem does not exists, please send us a repro demo and a concrete list of repro steps. Thus we will be able to review the issue and follow you up with more details.

    Georgi Krustev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Bastian
    Bastian avatar
    9 posts
    Member since:
    May 2014

    Posted 18 Nov 2015 Link to this post

    Currently I am on the another builing site, so there is no time for jumping again into the theme. For time purposes another solution was taken, so that this malpractice has no influence. Thank you.
Back to Top