freqdec / datePicker

An attempt at writing a flexible, framework free, feature-rich and accessible datepicker
http://freqdec.github.io/datePicker/
MIT License
171 stars 56 forks source link

Autoformatting changes the format #57

Open nupply opened 9 years ago

nupply commented 9 years ago

If I set the format to %d-%m-%Y and type 01-04-2001 or 01 04 2001, the date stays/is converted to 01-04-2001. However, if I type 01 04 01 or 01-04-01, the format is changed to %m-d%-%Y and I end up with 04-01-2001

waxingsatirical commented 6 years ago

I think what you are seeing is the backup javascript implementation of date.Parse being used. This happens then the input string cannot be matched to the format you set. 01 04 01 is being parsed as January 4th 2001, which is then being displayed as 04-01-2001 which is the format you set.

I've had similar issues