question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[DatePickerIOS] "Warning: Failed propType..." even when required propTypes are provided to DatePickerIOS

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
ghostcommented, Aug 23, 2015

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

0reactions
Kitloocommented, Jun 20, 2018

So the solution is???

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found