hypeserver / react-date-range

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

Predefined date selections allow selection of disabled dates #602

Open Aamir-MCSAM opened 1 year ago

Aamir-MCSAM commented 1 year ago

Subject of the issue

Predefined date filters allow selection of disabled dates. When we have maxDate defined to today and we hit this week or this month it selects dates past maxDate attribute value.

[BUG] Bug Reproduce Steps

disable half of the week or month and then hit this week or this month depending on what you disabled month or week then check the change event output it will return dates past the maxDate value.

[BUG] Expected behaviour

Ideally it shouldn't return dates past the maxDate value with predefined date ranges.

Environment

Package Version: ^1.4.0 React version: ^18.2.0 Node version: 18 Browser: chrome