I use the datepicker component with the editable property set to “true”. Works great. However, when the user types “31/02/2015” (a date that does not exists), webix changes the date to “03/03/2015”.
Another example: if I type “3216547”, the date becomes “09/08/10806”. Obviously, this is unwanted. If the user is not careful, they might not see the change and submit an incorrect date.
Is there a way to prevent webix from changing the date and throwing an error instead? Perhaps just clear the field, …
Datepicker converts the input according to the current date format. And it already has some limitations: a long enough meaningless value will be transformed into null. It works via rigid logic, so there is no way to prevent the conversion.
I understand there might be some technical reasons why you would handle the issue of incorrect values this way, but from a user standpoint, I don’t see how this could be useful. If the user is not careful he will save a date that was not the intended date.
You can change the parsing format format via a string:
view:"datepicker", format:"%Y-%m-%d"
Or, if you want to control the values that user enters, you can create a custom component and parse the value with any means you like: http://webix.com/snippet/f35041c9