Datepicker with type 'time' is not displaying the time correctly.

Hi All,

I face an issue with the datepicker type 'time'. The backend gives me the date formatted as follows: "1900-01-01 07:00:00". I expect the datepicker to display 7:00; however, it's displaying 4:01. I reproduced the issue in the following snippet: https://snippet.webix.com/33xhmtn6. Any help will be appreciated!

Thanks,
Martin

Tagged:

Comments

  • edited September 10

    Hello @zevenbergm ,
    Please try to use Date object instead of string.
    Please take a look at the next example:
    https://snippet.webix.com/bn38p89z

  • Hello @annazankevich ,
    Thanks for your suggestion. In this case, the display is OK but the form getValues() gives only the time and not the full date string. I need the full date string back in order to update the backend. If I set the value directly on the value property it works without any issues... what is the difference? :smile:

  • Hello all,
    I solved the issue! In my case, I had to change the webix.i18n.parseTimeFormat to the server date and time format. Please do not forget to call webix.setLocale() afterwards... :smile:

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!