react-native-neat-date-picker
react-native-neat-date-picker copied to clipboard
minDate prop don't works fine in android
Here is mi code:
import DatePicker from 'react-native-neat-date-picker';
return (
<DatePicker
isVisible={showDatePicker}
mode={'single'}
onCancel={onCancel}
onConfirm={onConfirm}
initialDate={date}
startDate={date}
minDate={new Date()}
/>
)
The minDate is 25-07-2022 but, the picker dont let choose that day. I will try to make a PR when I fix it.
Update:
It looks like its a problem with minDate internal function, it compares entire date gaves by developer with the date in central timezone (T00:00:00Z) and that is the problem. I'd like to make a PR with a custom hook to use when someone needs to use this prop.