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.
|
this.props.selected || this.props.openToDate || newDate(); |