Hacker0x01 / react-datepicker

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

YearDropdownStepNumber for the datepicker component #4396

Open Luckbox314 opened 12 months ago

Luckbox314 commented 12 months ago

Is your feature request related to a problem? Please describe. I use showYearDropdown with scrollableYearDropdown and I get the problem that if I show the user a range of years, like for example, from 2013 to 2033 and they want to select an older year, like 1953 for example, they have to click on the down arrow of the scroll 60 times. That's needlessly tedious.

Describe the solution you'd like The problem would get solved by a parameter YearDropdownStepNumber that would function similar to yearDropdownItemNumber but configuring how many years get added every time you press the down or up arrow, this could mean that I can configure it to 10 for example and then my user only has to press the arrow 6 times instead of 60.

Describe alternatives you've considered Another option to make this less tedious is to set the yearDropdownItemNumber to a high number, like 100. The problem is that if the user needs to enter a date only a few years outside the original range, the experience get's really tedious.

Additional context

image image

Clicking the down arrow only adds one year.

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 10 days.