Hacker0x01 / react-datepicker

A simple and reusable datepicker component for React
https://reactdatepicker.com/
MIT License
8.06k stars 2.24k forks source link

Fix #4011: 🐛 Handle Arrow Navigation on calendar days even when the minDate/maxDate is nul #4848

Closed balajis-qb closed 4 months ago

balajis-qb commented 4 months ago

Closes #4011

Description

As mentioned in the Linked issue when the minDate or the maxDate is set to null, the mouse navigations are allowed for all the days and months, but however the keyboard navigation is disabled. That means when the minDate/maxDate is null, eventhough users are allowed to select any dates, but just they can't do it via keyboard arrows. I resolved this issue in this PR and added a corresponding test cases to verify the changes

Contribution checklist

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.75%. Comparing base (17c0fb6) to head (38d1d23).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #4848 +/- ## ======================================= Coverage 96.75% 96.75% ======================================= Files 28 28 Lines 2991 2991 Branches 1288 1288 ======================================= Hits 2894 2894 Misses 97 97 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.