Skip to content
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

Close calendar on change of focus #1170

Closed
sabina4 opened this issue Dec 12, 2017 · 4 comments
Closed

Close calendar on change of focus #1170

sabina4 opened this issue Dec 12, 2017 · 4 comments

Comments

@sabina4
Copy link

sabina4 commented Dec 12, 2017

How can I close the datepicker's calendar when user enters another input?

Scenario:
User enters datepicker, calendar opens, without choosing any date, user clicks on another input, the calendar doesn't close and the focus returns to the datepicker

@alex-shamshurin
Copy link
Contributor

You can save a reference to a date picker itself, and pass it to another component and when you need use ref.setOpen(false)

@aij
Copy link
Contributor

aij commented Dec 14, 2017

It should normally close when clicking outside the calendar. See the demo page.

What is the other input you are testing with? Is it react-select?

@sabina4
Copy link
Author

sabina4 commented Dec 14, 2017

@aij yes react-select

@rafeememon
Copy link
Contributor

Closing as a dupe of #730

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants