Record the disable action in your Ok button click event, following
"Ok": {
click: function () {
$(".ui-dialog-buttonpane button:contains('Ok')")
.attr("disabled", true)
.addClass("ui-state-disabled");
}
}
All the buttons in your dialog box will be entered above the code and select the "OK" button, and adding an attribute is disabled only for this button.
source
share