react-calendar
react-calendar copied to clipboard
Setting the value of the calendar to undefined doesn't deselect the day that was previously selected
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
I set the value to a certain date and that day turns blue. If I then set the value back to undefined, the day is still blue.
Steps to reproduce
- Set the value prop to a day.
- Set the value prop to undefined.
- See how the day that was set in step 1 is still blue.
Expected behavior
The blue color should disappear if no date is selected.
Actual behavior
The blue color is still there as if there was a date selected, but the value is undefined so there shouldn't be any.
Additional information
No response
Environment
- React-Calendar version: 4.8.0
- React version: 18.2.0