Skip to content

rdp-selected not added on disabled from day when using onDayClick #2525

@staaky

Description

@staaky

Code

When using onDayClick for custom selection behavior, disabling the from day after clicking it won't give it the rdp-selected class. This used to work in v8, there it got both rdp-disabled and rdp-selected.

See this codesandbox

Also note the empty function in onSelect, it's needed for onDayClick to work since that makes the component controlled in v9.

Expected Behavior

A disabled selected from day should have both rdp-disabled and rdp-selected. So you can see the start of the selection even with the day being disabled.

Actual Behavior

In v9, rdp-selected isn't added, so you don't see the start of the selection.

Screenshots

Current Expected
image image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions