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

Selector: 100 years or more causes wrong date to be selected #2046

Open
ernestogarciamutio opened this issue Jun 28, 2021 · 3 comments
Open

Comments

@ernestogarciamutio
Copy link

Hello there i was testing a Selector : DatePicker and added a date range with years -100 and + 100

props.setDatePicker = (idItem) => {
let _default = $(#${idItem}).val();
if (_default === "01/01/0001")
$(#${idItem}).val(null);
$(#${idItem}).datepicker({
showOn: 'focus',
changeMonth: true,
changeYear: true,
altFormat: "mm/dd/yy",
dateFormat: "mm/dd/yy",
yearRange: "-100:+100",
beforeShow: function () {
setTimeout(function () {
$('.ui-datepicker').css('z-index', 99999999999999);
}, 0);
},
onClose: function (date, datepicker) {
datepicker.input.valid();
}
});

And when i select a date with +100 years or - 100 years such as 05/24/2123 manually as an example ,the year 1921 is auto selected on my html input to 1921

@xss-pariah
Copy link

do you have a fully detailed css for this or is this all you have thus far? im sure the answer could be as simple as proper functions, setup in the callback lib to help give more variety. simply telling it to pick between 1-100 may not let it know its amount of options it has from the yearly digits it seems so stuck on lol XD . just my thoughts. to know more it would probably help to see the HTML also incase you got some type of mishap there causing it to focus on 1921 , instead of the commands to choose . , hope4 you find your answer. and is the script javascript?

@melloware
Copy link

Isn't this a jQueryUI issue not a Jquery issue?

@mgol mgol transferred this issue from jquery/jquery Feb 2, 2022
@mgol
Copy link
Member

mgol commented Feb 2, 2022

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/.

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