date format

Hi webix team,

My date is in d/m/Y format. how can I set it to date picker.

https://snippet.webix.com/mvk0e30g

It is providing me a wrong result.

Comments

  • edited May 16

    Hello,
    There you can see two ways of how you can convert date into string and vice versa.

    • change global format for handling date and time ( "%Y-%m-%d %H:%i" by default )
    webix.i18n.parseFormat = "%d/%m/%Y %H:%i"
    webix.i18n.setLocale();
    
    • custom parser which returns a date object from string with specified format
    var parser = webix.Date.strToDate("%d/%m/%Y");
    

    Please check the sample: https://snippet.webix.com/59qgh9vr
    more information about formatting is here

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!

In this Discussion