-
Notifications
You must be signed in to change notification settings - Fork 725
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
iOS "Invalid Date" #26
Comments
I'm still seeing this bug when I don't select any date on iOS. On Android is a random bug. ANy ideas? |
ok, for my problem this was not an issue with the datepicker library but with how I was sending the date to moment. Check this: https://stackoverflow.com/questions/41874676/react-native-code-doesnt-work-without-remote-debugger-enabled Basically I just need to send moment('my date', 'the format so moment can correclty convert my date') |
Somewhat related to this - it appears that if you have value (non-empty string) for both placeholder and date, it will render correct in the simulator, but give |
I fixed mine like this.., dueDate could be a string but has a value of invalid date syntax e.g. "0000-00-00" or "" hope this helps (: |
convert string to date, you can fix:
|
Hi
I came across the following issue for react-native-datepicker.
This is how I am using datepicker component:
Initially this.state.dob is an empty string "" so that placeholder is displayed to the user.
So when I click on datepicker component I have this:
I was expecting it to default to the current date/time instead of beginning of time.
And if I click on Confirm without selecting any date I get an error "Invalid date".
On Android I do not remember seeing this behaviour.
This is how I am currently solving the problem, but not sure if this is the best solution:
Any help is appreciated, thanks.
The text was updated successfully, but these errors were encountered: