react-datepicker
react-datepicker copied to clipboard
Component crashes on some actions when selected={dateString}
When the component is used with selected property set to string, not Date object, some actions in date-time or time-only modes like choosing date, opening times list second time, etc, produce an error d.getFullYear() is not a function.
The error is in this line, where value of selected is considered a date object if it is not empty. https://github.com/Hacker0x01/react-datepicker/blob/3da627ea6c8da28672d61fdc849e881d703ce636/src/time.tsx#L217