react-calendar
react-calendar copied to clipboard
react-calendar__tile--active stays on even if value was cleared
Before you start - checklist
- [X] I followed instructions in documentation written for my React-Calendar version
- [X] I have checked if this bug is not already reported
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
- Browser (if applicable): Chrome 126.0.6478.183
- React-Calendar version: 5.0.0
- React version: 18.0.0