react-native: [DatePickerIOS] "Warning: Failed propType..." even when required propTypes are provided to DatePickerIOS
I am receiving errors for required propTypes in 0.9.0 even though they are provided to DatePickerIOS, even though the UI renders successfully and I am able to interact with the datepicker.
This code:
<DatePickerIOS
style={styles.button}
date={new Date(this.state.date)}
mode="date"
onDateChange={this.onDateChange}
/>
Triggers these warnings in the Chrome debugger-ui console:
Warning: Failed propType: Invalid prop `date` supplied to `RCTDatePicker`, expected instance of `Date`. Check the render method of `DatePickerIOS`.
Warning: Failed propType: Required prop `onDateChange` was not specified in `RCTDatePicker`. Check the render method of `DatePickerIOS`.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 16 (5 by maintainers)
I just got this error as well. Besides, DatePickerIOS rolls back to present time by it self. I am with RN 0.9.