title: Telerik MVC Disable DatePicker using javascript
body: <p>I need to disable Telerik MVC Disable DatePicker. The problem is telerik mvc datepicker is added in dom using jquery html() function.</p>
  
  <p>After it loaded in dom i have to disable it. </p>
  
  <p>I couln't use "$("#AccountInformalHearingDate").data("tDatePicker").disable()" method.</p>
  
  <p>i'm $("#AccountInformalHearingDate").data("tDatePicker") is undefined error.</p>
  
  <pre><code>  &lt;pre&gt;
            var userId = getUserId();
            $.ajax({
              type: "POST",
              url: $Url.resolve("~/ClientSetup/ClientAccounts/UpdateAccountDetails"),
              data: { AccountId: accountId},
              success: function (data) {
                  $('#AccountDetailsContainer').html( @(Html.Telerik().DatePicker()
                      .Name("AccountInformalHearingDate")
                      .Value(new DateTime(2010, 1, 1)) 
  
                   if(userId == 10){     
                       $("#AccountInformalHearingDate").data("tDatePicker").disable();
                   }
  
              ));
              },
              error: function (xhr, ajaxOptions, thrownError) {
                  alert(xhr.responseText);
              }
          });
    &lt;/pre&gt;
  </code></pre>
  
  <p>But i'm getting control undefined error. Since i cannot disable telerik controls all behaviour without data() function</p>