-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(date-picker): correct deleted end range behavior #13108
fix(date-picker): correct deleted end range behavior #13108
Conversation
✅ Deploy Preview for carbon-components-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
…tart-date-after-tabbing-off-end-date
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.
Thanks for tackling this one! Looks great - the double focus issue is much less of a concern compared to the original bug. I think we can merge this even with that slight remaining nit and circle back to it if necessary.
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.
It is working as expected! 🎉 ✅ 👍🏻
…tart-date-after-tabbing-off-end-date
…tart-date-after-tabbing-off-end-date
Closes #12734
Prevents end date from being deleted on datepicker change when user has not made changes to input.
Changelog
Changed
onChange
behavior to prevent end date being deletedTesting / Reviewing
You should still see both previously selected dates displayed in the calendar. Compare to react.carbondesignsystem.com where date gets deleted
Note
There's a "double focus" issue when tabbing off the end date after changing it manually and not pressing "enter" to trigger the change, I paired up with Taylor on this and we're fine with this behavior for now until flatpickr gets more stable upstream or we switch into a different implementation