Skip to content

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

Open
@ernestogarciamutio

Description

@ernestogarciamutio

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions