Aniket Narvankar

Aniket Narvankar

  • 527
  • 2.1k
  • 579.8k

Kendo DatePicker

Jun 19 2022 6:37 AM

I am using a Kendo DatePicker

                                                    @Html.Kendo().DatePicker().Name("RunDateDisplay").HtmlAttributes(new { type = "text", @Style = "width: 100px;", tabIndex = "13" }).Format("MM/dd/yyyy")

I want to make it readonly on page loads and when user checkbox make it readonly false.

This is what i have done. On document.ready wrote this

        $("#RunDateDisplay").attr("readonly","readonly"); to make this readonly and on checkbox click did this

 $("#RunDateDisplay").removeAttr('readonly');

 

but this is not working. calendar is not loading,please let me know how this could be done.


Answers (7)