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

🐛 Fix: Date picker not closing after selecting date #174

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

murilo9
Copy link
Contributor

@murilo9 murilo9 commented Dec 8, 2024

This fixes #131.

The problem was caused by DatePicker's wrapper div onFocus, which was calling the openEndDatePicker and openStartDatePicker functions. Those functions were setting DatePicker's state to keep it open. As the open/close logic of DatePicker is managed by the DatePicker component itself, there is no need to have those functions anymore (I guess they were part of some older implementation logic).

All tests have passed.

@murilo9 murilo9 changed the title 🐛 Fix: Date picker not closing after selecting date #131 🐛 Fix: Date picker not closing after selecting date Dec 8, 2024
@tyler-dane tyler-dane self-requested a review December 9, 2024 14:14
@tyler-dane tyler-dane added the bug label Dec 9, 2024
@tyler-dane
Copy link
Contributor

Looks good, @murilo9! Glad we could remove some of that code. I think you're right about that code being there as a result of an older implementation.

@tyler-dane tyler-dane merged commit 6fb78b7 into SwitchbackTech:main Dec 9, 2024
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

Successfully merging this pull request may close these issues.

Date Picker doesn't close after selecting date
2 participants