Skip to content

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

Merged
tyler-dane merged 1 commit into
SwitchbackTech:mainfrom
murilo9:fix/issue#131
Dec 9, 2024
Merged

🐛 Fix: Date picker not closing after selecting date#174
tyler-dane merged 1 commit into
SwitchbackTech:mainfrom
murilo9:fix/issue#131

Conversation

@murilo9
Copy link
Copy Markdown
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
Copy Markdown
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