You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a birthdate-style datepicker, the most convenient solution seems to be to set the viewMode to decades and the viewDate to January 1, 1900, like so:
This works as expected the first time the user clicks on the toggle icon. The user is shown every decade from 1900s to 2000s, making an easy entry point without having to click the left or right buttons.
But if the user closes the picker without picking a date, viewDate is reset to the current time. So the next time the user opens the picker, the viewMode is still decades, but now the view shows decades from 1990 through 2100.
This change violates the principle of least surprise. Instead, viewDate should remain set unless a date is actually selected from the picker.
Also, this is only tangentially related, but viewDate is not documented at all.
The text was updated successfully, but these errors were encountered:
ouija
added a commit
to ouija/tempusdominus-bootstrap-4
that referenced
this issue
Oct 8, 2020
For a birthdate-style datepicker, the most convenient solution seems to be to set the viewMode to decades and the viewDate to January 1, 1900, like so:
This works as expected the first time the user clicks on the toggle icon. The user is shown every decade from 1900s to 2000s, making an easy entry point without having to click the left or right buttons.
But if the user closes the picker without picking a date,
viewDate
is reset to the current time. So the next time the user opens the picker, theviewMode
is still decades, but now the view shows decades from 1990 through 2100.This change violates the principle of least surprise. Instead,
viewDate
should remain set unless a date is actually selected from the picker.Also, this is only tangentially related, but
viewDate
is not documented at all.The text was updated successfully, but these errors were encountered: