mugifly / jquery-simple-datetimepicker

Date & time picker for jQuery, It's simple & clean.
http://mugifly.github.com/jquery-simple-datetimepicker
Other
260 stars 182 forks source link

When time is not used, input is not parsed correctly #167

Closed royzrj closed 8 years ago

royzrj commented 8 years ago

When the datetime format is any other than the standard 'YYYY/MM/DD hh:mm' and the user types only the date in the input field, it is parsed incorrecty because the hours and minutes fields are 'undefined', returning an invalid date. And then it falls back to the standard datetime format parsing, which returns a different date than what the user typed. Just to be clear, this happens when the user uses the keyboard to type in the date, not when the user selects the date from the calendar dropdown.

royzrj commented 8 years ago

Keeping it short: the user is forced to type the time when he/she chooses to type the date (when using any locale in which the datetime format is different than the 'YYYY/MM/DD hh:mm' default. I don't believe this should be an accepted behaviour.