"minimumDate" is not respected if the user confirms the date without changing the initial value
See original GitHub issueIn src/CustomDatePickerIOS/index.js
you initialize defaultProps.date
to a new Date()
and because defaultProps
is static, it doesn’t generally get recreated every time we display the picker.
Our application requires a minimumDate
which is typically 1 day from the instant the user displays the picker.
If the user displays the picker - it shows the minimum date correctly (the underlying iOS picker handles this) but, if the user confirms immediately without changing the date, _handleDateChange
never fires in your library and consequently, the state.date
that your library returns is the one from defaultProps
… which is NOT the date the picker was displaying and in our case, always less than the minimum date.
At a minimum, we’d like your library to return the date the picker actually displayed and which the user thought they were confirming.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
I have solution for temporary not permanent… @LutherBaker @gish94
@mmazzarolo is this bug resolved now or not ? Because i am also facing this issue and not able to find out any solution for it. Please suggest me what to do.