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

removed clickoutside hooks from calendar element #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

malectro
Copy link
Owner

NOTE: This PR is incomplete and more of a proof of concept.

Clickoutside is not native and does not play nice with any clicks that invoke stopPropagation. This is especially apparent when using react-select and react-datepicker on the same page.

Instead of refocusing after every blur of the datepicker input and only hiding the calendar onClickOutside, we can hide the calendar when the datepicker is blurred except in the case where the blur is caused by a calendar mousedown where we set a flag that tells the datepicker to refocus and continue to show the calendar.

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