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

Day component classnames disappear after toggling calendar

Open simkall opened this issue 4 years ago • 4 comments

react-dates version [email protected]

Describe the bug The CalendarDay components initially have the CalendarDay__blocked_out_of_range and CalendarDay__selected classnames set. After changing the selected value to a value a couple of months in the future and toggling the calendar component the classnames disappear.

Source code (including props configuration) https://github.com/simkall/react-dates-testing-

Steps to reproduce the behaviour:

  • Click "toggle calendar"
  • The calendar opens with the current date and days outside of the range highlighted.
  • Selected a date a couple of months in the future.
  • Click "toggle calendar"
  • Click "toggle calendar" again
  • Unavailable dates are no longer highlighted, and clicking dates no longer updates the selected value.

The highlighting reappears if you select the current date and toggle the calendar.

simkall avatar May 31 '21 13:05 simkall

I encountered this issue as well, quite a big deal as I may not be able to use the library because of it. How has this been open for over a year without any comments from the development team?

amcurative avatar Jun 17 '22 03:06 amcurative

@amcurative because the development team is one unpaid person. If you're interested in submitting a PR to fix it, that would be appropriate if it's indeed that big a deal to you.

ljharb avatar Jun 21 '22 18:06 ljharb

@ljharb Oh, my apologies then. I wasn't aware that was the case and assumed some team at airbnb was actively developing this. I will look into this issue to file a PR if I get some time.

amcurative avatar Jun 22 '22 05:06 amcurative

The project effectively hasn't been maintained by airbnb employees in well over 3 years; that's why it's no longer an airbnb project.

ljharb avatar Jun 22 '22 17:06 ljharb