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.

Warning: Failed prop type: Invalid prop value supplied to 'DateTimePicker.

See original GitHub issue

I’m having like 25 errors and the whole app is crashing when I’m triying to change the event starting hour. Every time I got this :

  1. Warning: Failed prop type: Invalid prop value supplied to 'DateTimePicker.
  2. Warning: Failed prop type: Invalid prop minDate of type object supplied to DateTimePicker, expected instance of Date
  3. Warning: Failed prop type: Invalid prop value supplied to DateTimeInput.
  4. Warning: Failed prop type: Invalid prop value supplied to Calendar.
  5. `Warning: Failed prop type: Invalid prop value supplied to Clock``. …

I will be grateful if someone can help me.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
njeirathcommented, Oct 15, 2021

Indeed I was on 3.4.1, upgrading to 3.4.2 fixed the issue for me. Thanks.

0reactions
djordje47commented, Nov 17, 2022

I had the same problem, I am using redux instead of the react useState hook.

I think the trick is to pass the new Date instance.

So instead of doing this: ... value={selectedTask.due_date ?? new Date()} I am doing this now and it works:

<DateTimePicker onChange={(value) => dispatch(setTaskDueDate(value))}
                          locale="sr"
                          value={selectedTask.due_date ? new Date(selectedTask.due_date) : new Date()}/>

If anyone still needs it. Cheers! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I fix the DatePicker Invalid prop value of type string ...
Warning : Failed prop type: Invalid prop value of type String supplied to DatePicker , expected instance of Date . in DatePicker.
Read more >
Invalid prop `value` of type `string` supplied to `TimePicker ...
Warning : Failed prop type: Invalid prop `value` of type `string` supplied to `TimePicker`, expected `object`.
Read more >
Failed prop type: Invalid prop
When an invalid value is passed for a prop, a warning is displayed on the JavaScript console. If default props are set for...
Read more >
Warning: Failed prop type: Invalid prop `children` supplied to ...
Warning : Failed prop type: Invalid prop `children` supplied to `ForwardRef(Typography)`, expected a ReactNode. */<Typography key={item.id}>
Read more >
Invalid prop 'value' of type 'number' supplied to 'TextInput'
This post is about the Warning: Invalid prop 'value' of type 'number' supplied to 'TextInput', expected 'string'. You will see this warning while...
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