title: How to properly disable form field in UCI using javascript
body: <p>I am trying to disable a date field(by selecting date) in the Dynamics365 CRM UCI version. It is disabling it but on selecting the date twice. It is working fine in a classical mode but not on UCI</p>
  <p>here is my code.</p>
  <pre><code>function ConfirmFunction(){
      debugger;
      var get_aob_date = Xrm.Page.ui.controls.get(&quot;ies_aobdatercvd&quot;);
      var confirmStrings = { text:&quot;This is a confirmation.&quot;, title:&quot;Confirmation Dialog&quot; };
      var confirmOptions = { height: 200, width: 450 };
      Xrm.Navigation.openConfirmDialog(confirmStrings, confirmOptions).then(
  function (success) {    
      if (success.confirmed)
           get_aob_date.setDisabled(true);
      else
          Xrm.Page.getAttribute(&quot;ies_aobdatercvd&quot;).setValue();
  });
  
  }
  </code></pre>