[DatePickerIOS] "Warning: Failed propType..." even when required propTypes are provided to DatePickerIOS
See original GitHub issueI 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`.
Issue Analytics
- State:
- Created 8 years ago
- Comments:16 (5 by maintainers)
Top Results From Across the Web
prop issues with DatePickerIOS in React Native - Stack Overflow
Warning: Failed propType: Required prop onDateChange was not specified in RCTDatePicker . Check the render method of DatePickerIOS .
Read more >Don't Call PropTypes Warning - React
Once this happens, any code that calls these functions manually (that isn't stripped in production) will throw an error. Declaring PropTypes is still...
Read more >How to forget about type errors in your React props with ...
In this article, we will be looking at how to making your debugging process faster with prop types in React, what they are,...
Read more >How to Use PropTypes in React - freeCodeCamp
Before the release of React 15.5.0, PropTypes were available in the ... of the prop and // value is the PropType } export...
Read more >unity remove component from gameobject - You.com | The Search ...
Just as a side note, if you also need to dynamically define new types by composing reusable components, I suggest looking into Entity...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I just got this error as well. Besides, DatePickerIOS rolls back to present time by it self. I am with RN 0.9.
So the solution is???