2

I'm using react datepicker with the scrollableYearDropdown. The issue is that when I click on the calendar and the scrollable year list pops up, the list starts halfway through the list instead of at the top. Is there anyway to get it to start at the year 2022, and to scroll down from there?

Here is my code:

<DatePicker className="finish-sign-up__input finish-sign-up__datepicker" id="birthDate"
                            selected={startDate}
                            onChange={(date) => setStartDate(date)}
                            onCalendarClose={birthdayChange}
                            showYearDropdown
                            yearDropdownItemNumber={115}
                            scrollableYearDropdown={true}
                            scrollableMonthDropdown
                            minDate={new Date("01/01/1902")}
                            maxDate={new Date()} />

Any help or recommendations would be greatly appreciated!

0 Answers0