I have a jQuery.dialog who show a form.
The first input is and I init the datepicker like this jQue
I had to disable the datepicker before opening the dialog and enable it upon opening. But, the issue reoccurs after the initial open if you don't disable it upon close, again.
$(document).ready(function () {
var dialog;
$("#date").datepicker();
$("#date").datepicker("disable");
dialog = $("#dialog-form").dialog({
autoOpen: false,
height: "auto",
width: "auto",
modal: true,
buttons: {
"Create note": function () {
$("#noteForm").submit();
},
Cancel: function () {
dialog.dialog("close");
}
},
open: function() {
$("#date").datepicker("enable");
},
close: function () {
$("#noteForm")[0].reset();
$("#date").datepicker("disable");
}
});
$("#create-note").button().on("click", function () {
dialog.dialog('open');
$("#time").focus();
});
});