Closed 11et401012 closed 7 years ago
You can use state flag to show the datepicker. For example
openDatepicker(){
this.setState({
openDatepicker : true
});
}
render() {
return (
<ModalBox backdropPressToClose={false} swipeToClose={false} isOpen=
{this.state.openDatepicker}>
<DatepickerRange
startDate: '13052017',
untilDate: '26062017',
onConfirm: {( startDate, untilDate ) => this.setState({ startDate, untilDate })} />
</ModalBox>
)
}
I'm using "react-native-modalbox" for the modal. You can use any other modal or just show it without modal, just use the flag like "openDatepicker" to open it. thank you
Hi I am trying react-native-range-datepicker My problem is how to open datepicker only onPress event .