Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Year dropdown scroll defaults to center of list #3646

Open
AbilityMaster opened this issue May 30, 2022 · 4 comments
Open

Year dropdown scroll defaults to center of list #3646

AbilityMaster opened this issue May 30, 2022 · 4 comments

Comments

@AbilityMaster
Copy link

AbilityMaster commented May 30, 2022

I'm using the showYearDropdown prop and maxDate prop on the datepicker but when I click the year dropdown, it will always start at the center of list. Is there a way to set the default value of the dropdown to the current year?

How it opens now:
image

How it is expected to be opened:
image

@anas510
Copy link

anas510 commented Jun 2, 2022

Same behavior is happening for me too
@AbilityMaster any solution so far?

@kit52
Copy link

kit52 commented Sep 13, 2022

@anas510 , @AbilityMaster
Is there a solution to this problem?

@turkus
Copy link

turkus commented Sep 14, 2022

@anas510 , @AbilityMaster Is there a solution to this problem?

I'm affraid it's because of maxDate, you have to remove it, same case with yearDropdownItemNumber, it doesn't adjust the height using scroll option. If you remove that prop, it centers, but it's not a solution, but a clue for solving this issue.

@SashaRepin2
Copy link
Contributor

SashaRepin2 commented Dec 3, 2022

Hello!) We solved this problem seems together with @AbilityMaster in PR - #3844

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants