Skip to content

Component crashes on some actions when selected={dateString} #5964

@borisgelbshtein-aps

Description

@borisgelbshtein-aps

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();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions