DatePicker display problem (year and month)

If one uses the %Y. %F %d format and value directly add in string format then the month name is not correct.

See here:
http://webix.com/snippet/c8e50539

Workaround:
… value: new Date(“2017-02-17”) …
and not
… value: “2017-02-17” …

Hello,

Such behaviour is expected. For month and year pickers the format setting of the Datepicker is used for parsing the string value to a Date value and for forming a string in the input field.

So, if you want the date to be parsed correctly, please provide either the Date object as value, or the string in the correct format, e.g. “2017-February-17” for “%Y. %F %d” format.

Please, check: http://webix.com/snippet/c57b2a30

Or, if your cannot change your input data, you can provide a function as format. It will be used only for displaying value in the input, while the date will be parsed according to webix.i18n.parseFormat, which is “%Y-%m-%d %H:%i” by default.

You can check this solution in the following snippet: http://webix.com/snippet/a31ddf92