I'm trying to use react-datepicker with [email protected]. When clicking on a day in the calendar, react-datepicker is croaking with what you see in the following screen shot...

Any ideas?
Ahhh, I think I may have found a clue: https://github.com/Hacker0x01/react-datepicker/issues/167
The "selected" property must be a Moment.js object--not a regular Javascript date object...
I fixed this myself by setting my "selected" property to a moment() object.
+1 for docs reflecting the need to use a moment() object for the "selected" property.
@tamitutor your solution made my day
tnx alot
Most helpful comment
Ahhh, I think I may have found a clue: https://github.com/Hacker0x01/react-datepicker/issues/167
The "selected" property must be a Moment.js object--not a regular Javascript date object...
I fixed this myself by setting my "selected" property to a moment() object.