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`.

screen shot 2015-08-21 at 10 09 54 am screen shot 2015-08-21 at 10 09 34 am

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 16 (5 by maintainers)

Commits related to this issue

Most upvoted comments

I just got this error as well. Besides, DatePickerIOS rolls back to present time by it self. I am with RN 0.9.