-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[DateRangeInput] external controls to .open()
or .close()
date picker popover
#1053
Comments
.open()
or .close()
date picker popover.open()
or .close()
date picker popover
This feels a little weird... it sounds like a new API to allow users to switch between uncontrolled & controlled mode during the component's lifecycle. I'd be curious to see what the code looks like with and without this new API and how this changes the space of possible configurations that need to be unit tested. |
Agree that it feels weird, and I'm definitely open to feedback (cc @haosharon for additional context). Desired workflow is:
You could accomplish this with a manual |
Yea - we are able to accomplice [1-3] with a manual The absolute correct solution is to control it ourselves, but my worry is the code to enforce that in DateRangePicker will be very brittle because there seems to be some complicated interactions between |
Decided against this in #1055. The recommendation here is to get a ref on the input and call |
We want to trigger the datepicker to be open or closed sometimes based on focus events.
It's a bit cumbersome to track popoverState externally and pass that down because there's a lot of complex logic that goes into computing the date picker open state - it would be nice to just be able to trigger actions (based on focus / blur etc)
The text was updated successfully, but these errors were encountered: