[Bug] - Date picker - minYear/maxYear restriction is not working as expected. User is able to navigate outside of the year range using arrow keys.
srivalli-sivaramasankaran opened this issue · 0 comments
srivalli-sivaramasankaran commented
Component
fw-datepicker
Describe the bug
minYear/maxYear restriction is not working as expected. User is able to navigate to the year that falls outside of the given maxYear/minYear range using the arrow keys.
To Reproduce
- Add a date picker component with min-year and max-year attributes. eg: min-year="2019" max-year="2022"
- Click the year dropdown and verify if the options fall within the specified year range
- Click the left and right arrows to move to the year that falls outside of the specified range.
Expected behavior
User should not be able to navigate to the year that falls outside of the specified range via arrow keys.
Screenshots
Dropdown with options (2019-2022) that fall within the specified range
Year 2024 (falls outside of range) via right arrow key
Code Sandbox Link
codesandbox.io