Accept value as string
See original GitHub issueI keep getting these three errors:
proxyConsole.js:56 Warning: Failed prop type: Invalid prop `value` supplied to `MonthView`.
in MonthView
...
./node_modules/react-date-picker/node_modules/react/cjs/react.development.js.Component.setState @ react.development.js:237
DatePicker._this.closeCalendar @ DatePicker.js:70
DatePicker._this.onClick @ DatePicker.js:65
proxyConsole.js:56 Warning: Failed prop type: Invalid prop `value` supplied to `Days`.
in Days
...
./node_modules/react-date-picker/node_modules/react/cjs/react.development.js.Component.setState @ react.development.js:237
DatePicker._this.closeCalendar @ DatePicker.js:70
DatePicker._this.onClick @ DatePicker.js:65
dates.js:34 Uncaught TypeError: date.getMonth is not a function
at getMonthIndex (dates.js:34)
at getBeginOfDay (dates.js:258)
at getDayRange (dates.js:276)
at getRange (dates.js:452)
at getTileClasses (utils.js:93)
at Days.render (Days.js:72)
...
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
How can a string accept an integer? - java - Stack Overflow
Anything that is given in double quotes is String and + is for concatenating string with an any value(int value). So the integer...
Read more >Check user Input is a Number or String in Python - PYnative
Use string isdigit() method to check user input is number or string. Note: The isdigit() function will work only for positive integer numbers. ......
Read more >Program to check if input is an integer or a string
Write a function to check whether a given input is an integer or a string. Definition of an integer : Every element should...
Read more >Handling text — strings in JavaScript - Learn web development
Just like we did with numbers, we are declaring a variable, initializing it with a string value, and then returning the value.
Read more >15: 9.4. String Functions and Operators - PostgreSQL
This section describes functions and operators for examining and manipulating string values. Strings in this context include values of the types character ...
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 FreeTop 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
Top GitHub Comments
I have faced the same issue saying date.getMonth is not a function in the console when I click the calendar icon to change the date
the state variable Revisiondate is a property of Date type, any help?
@dfalling, thanks for this. react-date-picker does not support value as a string, as in documentation. You need to wrap the date in new Date().