Jason K Jason K - 4 months ago 35
Javascript Question

How to disable dijit ConfirmDialog button

How can i disable the Ok button on dijit/ConfirmDialog?

var lasloLoginFormDialog = new ConfirmDialog({
title: "Login",
closable: false,
});


https://jsfiddle.net/Jason96/mqyyp20u/4/

Answer

The confirmDialog has an okButton attribute that represents the OK button.

You can set it to disabled.

lasloLoginFormDialog.show();
lasloLoginFormDialog.okButton.set('disabled',true); // add this line after show