hypeserver / react-date-range

A React component for choosing dates and date ranges.
MIT License
2.59k stars 678 forks source link

When set the `minDate` or `maxDate` for calendar, the month selector also need to consider the date range. #567

Open Saix1020 opened 2 years ago

Saix1020 commented 2 years ago

Subject of the issue

When set the minDate or maxDate for calendar, the month selector also need to consider the date range.

[BUG] Bug Reproduce Steps

I set the maxDate to 2022-4-5, when I choose the year of 2022 on year selector, the months shown in the month selector should not be greater than 4.

[BUG] Expected behaviour

The months displayed in the selector should be 1, 2, 3, 4

Environment

Package Version: React version: 16.12.0 Node version: 14 Browser: chrome 100.0.4896.60