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

Datepicker with custom yearRange; curent year in the middle of dropdown #2222

Open
crocimi opened this issue Mar 28, 2024 · 6 comments
Open

Comments

@crocimi
Copy link

crocimi commented Mar 28, 2024

Per default, with "changeYear: true" the current year is in the middle of the dropdown, allowing selecting a year close to the current one without scrolling.

image

If I define a yearRange: "c-100:c+100" the current year is displayed on the bottom of the dropdown, se selecting a following year request a scroll operation.

image

It's possible to change it so that the current year is always in the middle?

@mgol
Copy link
Member

mgol commented Apr 2, 2024

Thanks for the report. Does the issue you describe exist when jQuery UI 1.12.1 is used or only with jQuery UI 1.13.0 or newer?

@crocimi
Copy link
Author

crocimi commented Apr 10, 2024

It happens also with jQuery UI 1.13.2.

Here an example:
https://jsfiddle.net/Mich24/mve82jqw/1/

@mgol
Copy link
Member

mgol commented Apr 10, 2024

That was not my question. I’m asking whether it also happens with jQuery UI 1.12.1.

@crocimi
Copy link
Author

crocimi commented Apr 10, 2024

Sorry, it happens also with UI 1.12.1

https://jsfiddle.net/Mich24/eyk6tpm9/1/

@mgol
Copy link
Member

mgol commented Apr 11, 2024

Thanks for the report. Since the issue is already in 1.12, given limited team resources it's not likely to be fixed by the UI team; see the project status at https://blog.jqueryui.com/2021/10/jquery-maintainers-update-and-transition-jquery-ui-as-part-of-overall-modernization-efforts/. PRs are welcome if they're not too complex and contain tests.

@markvantilburg
Copy link
Contributor

Is it even possible to set the scrollbar at a specific position in a select?

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

No branches or pull requests

3 participants