wojtekmaj / react-calendar

Ultimate calendar for your React app.
https://projects.wojtekmaj.pl/react-calendar
MIT License
3.59k stars 514 forks source link

react-calendar__tile--active stays on even if value was cleared #944

Open lemontini opened 4 months ago

lemontini commented 4 months ago

Before you start - checklist

Description

The class indicating active ("selected") state of a tile in month view (class react-calendar__tile--active) is not removed if the value supplied to react-calendar is cleared (e.g. setValue(undefined)). The only workaround is to use tileClassName and set the custom selected class to style active ("selected") day accordingly.

Steps to reproduce

screen recording provided.

Expected behavior

react-calendar__tile--active is removed from all tiles, as no value is selected (value=undefined)

Actual behavior

react-calendar__tile--active stays on corresponding day tile

Additional information

screen recording: https://github.com/user-attachments/assets/d83076fa-a51a-47ce-9304-af446d6581d8

Environment

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.

lucasriondel commented 2 weeks ago

This should not be closed as this is not resolved