Selector: 100 years or more causes wrong date to be selected
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
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?
Isn't this a jQueryUI issue not a Jquery issue?
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/.