Answer the question
In order to leave comments, you need to log in
Why in jQueryUI Datepicker the onSelect event doesn't see setDate?
Tell me this question, I initialize the datepicker, after I listen to the "date picker" event - onSelect.
And if you choose the date yourself, then it works. But if I set the dates through the api function "setDate", then the event does not fire.
Working example of this code: https://jsfiddle.net/atach/mfkgyxnv/8/
$( "#datepicker" ).datepicker();
$( "#datepicker" ).datepicker( "option", "onSelect", function (dt) {
alert("1");
});
$( "#datepicker" ).datepicker( "setDate", '03/22/2019' );
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question