Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minDate prop don't works fine in android #17

Open
diecodev opened this issue Jul 25, 2022 · 1 comment
Open

minDate prop don't works fine in android #17

diecodev opened this issue Jul 25, 2022 · 1 comment

Comments

@diecodev
Copy link
Collaborator

diecodev commented Jul 25, 2022

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
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant