forked from react-native-datetimepicker/datetimepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Issue react-native-datetimepicker#935: Unable to select a date …
…earlier than Unix epoch when only a maximum date is provided on Android
- Loading branch information
Showing
1 changed file
with
3 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fc25826
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this fix doesnt work properly also, minimumDate property is ignored, but minimumDate is now not blocked to 1970, the current minimum date is 1900 year
fc25826
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so basically problem with this issue that in the Common.java variable "RNConstants.ARG_MINDATE" doesn't receive value provided by user in "minimumDate".
fc25826
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, problem is that when you only provide maximum date, and you don't provide min date in react-native side, your min date set as 1970 year. I don't whether this is a bug or not, because you set a maximum date in this case. I can change this behavior but I think this is not a big problem. And my PR only changes minDate default as 01 Jan 1900. So Actually I will close my PR and I might change the code to give a good result in some situations such as maxDate provided but minDate is not provided.