duetds / date-picker

Duet Date Picker is an open source version of Duet Design System’s accessible date picker. Try live example at https://duetds.github.io/date-picker/
https://www.duetds.com
MIT License
1.73k stars 68 forks source link

Default date is strange for future months #14

Closed martinlex closed 4 years ago

martinlex commented 4 years ago

Describe the bug When I navigate with keyboard, I open the date picker. I go from date to year to next/prev month buttons.

When I leave the next/prev month buttons: If it's the current month: the default focus is today's date (Sep 17th) - Correct If it's any month in the future: the default focus is still today's date (= Oct 17th, Nov 17th etc) - Seems strange I think it would be better if the focus goes to the 1st.

WickyNilliams commented 4 years ago

I think this comes down to personal preference? Having checked a number of date pickers, seems like some move to first day of month (as you suggest), whilst most move to same day of month (as happens here).

I would personally say the current behaviour here fine, and at least consistent with most date pickers. Here are a bunch which follow the behaviour here:

Would be interested to see any counter examples

arielsalminen commented 4 years ago

Hmm, I also agree with @WickyNilliams here. Would keep the behaviour as it is now.