Possible to disable a jquery ui dialog button

I am wondering when an update check box is checked, is it possible to disable Login next suggested value ABC12345

Here is my JSFiddle

The buttons in the dialog use the button widget, which has a disable method.

First, obtain a reference to the button element you want to disable. You can accomplish this using jQuery’s typical dom access functions, like .parent and .find. Inspecting the dialog using your browsers dev tools will show it’s structure and how you can get to the buttons.

Once you have the reference, call the button widgets disable method. For example:

const btn = $('#dialog-confirm').parent().find('.ui-dialog-buttonset button:first-child');