-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend DatePicker to support ranges #5232
Extend DatePicker to support ranges #5232
Conversation
Also make small improvements to the look of the regular date picker
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
216223b
to
81a00cf
Compare
And update e2e specs accordingly ..
When selecting a start date in range mode, automatically adjust the end date if the selected start date comes after the current end date. This prevents invalid date ranges where the end date precedes the start date.
81a00cf
to
26e09c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely love it!
Came onto some situations while testing where the choice of date felt a little buggy (regarding which of the two dates should be moved to the new location) - but didn't get any clear cases to reproduce just yet so might be simpler to try it out and change it after a little bit.
One thing that I think should be changed before merging this is closing the dialog after selecting your second date. As times are below dates I would naturally select a date first and that makes it annoying that it decides to close on its own before I've gotten to do that
I made some changes to this like 30 min ago - did you use the up-to-date code?
Very good point! I'll fix that asap |
At first I didn't, then I did - might be why I struggled to reproduce it properly. Looked smoother now |
If a timer picker is shown
Description
Better than having to use two separate date pickers to simulate it. The plan is to use this to filter on events on /events.
Result
Notice how the regular dropdown does not update which month is shown as default according to the value it is given (unlike the new range version 😎):
Testing
I have thoroughly tested my changes.
Tested when start date and end date are the same days (but different times of the day)
Tested as both fields and regular components (see images above)
Tested that changes to global table styles does not affect the Table component
Tested that it looks good on smaller viewports:

Tested that the regular date picker still works :)