react-multi-date-picker icon indicating copy to clipboard operation
react-multi-date-picker copied to clipboard

Future month gets displayed in range mode ignoring the set "maxDate"

Open SPeterFront opened this issue 1 year ago • 1 comments

If using the datepicker in range mode and if a max date gets set, the picker displays the next (future) month as well with all days disabled, which does not make sense.

How to reproduce:

  • Use datepicker with "range" mode
  • Set "maxDate"
  • When the picker gets opened, the next month (exceeding the max date) also gets displayed (all days are disabled though and you can not go one more month further into the future). It is also possible to navigate to the future month via header arrows

Expected behaviour:

  • If a "maxDate" is set in range mode, the next month (exceeding the max date) does not get shown at all and it should not be possible to show it by clicking the "next" arrow.

I.e. If the max date is set to last day in August 2024, the selected date range is also some range in August and I open the datepicker, it does not make sense to show September month as second month in the datepicker flyout, since a user cannot select anything there anyway. It would make more sense to then show Juli and August.

I could also not find a way to bypass this behaviour.

SPeterFront avatar Aug 28 '24 07:08 SPeterFront