When I close the DateTimePicker using "false" state, I cannot seems to reopen the modal again using "true" state.
Under the hood react-native-modal-datetime-picker uses react-native original DatePickerAndroid, TimePickerAndroid and DatePickerIOS.
Before reporting a bug, try swapping react-native-datetime-picker with react-native original date/time pickers to check if the problem persists.
react-native-modal-datetime-picker swap described abovereact-native-modal-datetime-picker you're using, and the platform(s) you're running it on (iOS, Android, device)I know this is closed, but I want to give a solution for those still having the issue. You need to set the value of your visibility variable to false whenever onConfirm is invoked.
Ex:
<DateTimePicker
isVisible={this.state.visible}
onCancel={() => this.setState({ visible: false })
onConfirm={(date) => {
// handle date
this.setState({ visible: false });
}}
/>
Most helpful comment
I know this is closed, but I want to give a solution for those still having the issue. You need to set the value of your visibility variable to false whenever onConfirm is invoked.
Ex: