react-native-neat-date-picker icon indicating copy to clipboard operation
react-native-neat-date-picker copied to clipboard

minDate prop don't works fine in android

Open diecodev opened this issue 2 years ago • 1 comments

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()}
  />
)

Date Picker error with minDate prop

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.

diecodev avatar Jul 25 '22 19:07 diecodev

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.

diecodev avatar Jul 25 '22 20:07 diecodev