-
Notifications
You must be signed in to change notification settings - Fork 842
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
[Date Picker] Updates to Year and Month via dropdown should trigger onChange
#1817
[Date Picker] Updates to Year and Month via dropdown should trigger onChange
#1817
Conversation
My intuition is to agree with this, however I'm not sure what we'd want to do when the new target year/month doesn't include the selected day, e.g. switching from January 31 to February, should it select the 28th/29th ? |
Good catch, @cchaos |
So we're good when it comes to that situation based on your comments @thompsongl ? |
Yes. |
Our policy at this point is that it's a fork we're independently maintaining for our own needs, so it's OK to change the installed package lib (we've done this already). We took a stab at some bigger upstream stuff, but didn't get the best response. Long term I think we'd like to build one of these internally from scratch, but the priority isn't there atm. |
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.
Changes LGTM
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.
Did a functional test of this one locally. It responds how we discussed in the comments. Nice work!
Summary
Fixes #1806
Co-opts the
adjustDateOnChange
prop fromreact-datepicker
and defaults totrue
.Prop is now exposed in the EUI API, so opting out is possible by passing
adjustDateOnChange={false}
Checklist
- [ ] This was checked in mobile- [ ] This was checked in IE11- [ ] This was checked in dark mode- [ ] Documentation examples were added- [ ] This was checked for breaking changes and labeled appropriately- [ ] Jest tests were updated or added to match the most common scenarios- [ ] This was checked against keyboard-only and screenreader scenarios- [ ] This required updates to Framer X components