Naxulanth / react-native-daterange-picker

A React Native component for picking date ranges or single dates.
MIT License
134 stars 89 forks source link

Backdrop feature #18

Open poPaTheGuru opened 3 years ago

poPaTheGuru commented 3 years ago

Would be nice an onPress backdrop feature that closes the DatePicker. Because it's hard to integrate in a Modal that have a backdrop while the DatePicker itself is another modal

nolife08021 commented 3 years ago

@poPaTheGuru Did you have any solution on this? I can't close the DatePicker Modal.

poPaTheGuru commented 3 years ago

@nolife08021 actually not yet, i had to go with another package that let me do that ( i won't say it here to not cause any problems) but i hope one day this feature will be available

nolife08021 commented 3 years ago

@poPaTheGuru alright thanks.

Naxulanth commented 3 years ago

Hey,

You can actually pass the open prop that gives you control over the state of the picker, which will allow you to open/close the picker however you wish to.

Note that passing this prop will disable the default function of the picker opening/closing through the means of pressing the backdrop/pressing the node (click me button, for instance) you have placed in the picker.

fcamargo10 commented 2 years ago

Would be nice an onPress backdrop feature that closes the DatePicker. Because it's hard to integrate in a Modal that have a backdrop while the DatePicker itself is another modal

Very good idea!

fcamargo10 commented 2 years ago

Or... close the picker automatically when both dates are selected.