evandhq/react-persian-datepicker

feature: hide datepicker after user choosed a day

thg303 opened this issue · 4 comments

Looks like user should click somewhere out to hide the datepicker, it would be great if it could be set via a property, like closeOnSelect on DatePicker component and default value set to false

is it possible to close datepicker after selectection?

@fereshtehaboohamzeh that's what this PR do, you may use the fork until this merged by @mohebifar as I said you have to set closeOnSelect={true} to the component like this:

<Datepicker closeOnSelect={true} ...>
...

same issue here

I find a trick use refs and after that using refName.state.isOpen = false in onChange method