react-calendar icon indicating copy to clipboard operation
react-calendar copied to clipboard

Setting the value of the calendar to undefined doesn't deselect the day that was previously selected

Open santiagopuentep opened this issue 4 months ago • 5 comments

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

  1. Set the value prop to a day.
  2. Set the value prop to undefined.
  3. 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

santiagopuentep avatar Feb 19 '24 13:02 santiagopuentep