This is a migrated thread and some comments may be shown as answers.

Disable DatePicker in Popup Edit screen from Kendo Grid

1 Answer 403 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Richard Cuti
Top achievements
Rank 2
Richard Cuti asked on 20 May 2013, 02:04 PM
Hi, I'm using a Kendo Grid which has it's editable mode to popUp.  When the edit screen pops up, all the fields from my model are displayed (this is what I want to happen).  Many of the fields however, I want to be readonly (or disabled actually).  I have an OnEdit method for the grid which is able to make many of the fields disabled, BUT the datepickers are still able to be clicked and the user is able to select a date from the popup calendar.  

How can I make the Dropdowns truly disabled so they cannot be clicked to display calendar AND also LOOK disabled??  BTW using  $("#AccountLockPeriod").data("kendoDatePicker").enable(false) does not work.


Here is my method:
<script>
    function onEdit(e) {
        $("#Id").attr("disabled", true);
        $("#UserName").attr("disabled", true);
        $("#AccountLockPeriod").attr("disabled", true);
        $("#IncorrectLogonAttempts").attr("disabled", true);
        $("#LastLogOn").attr("disabled", true);
        $("#InactivateDate").attr("disabled", true);
        $("#CreateDate").attr("disabled", true);
        $("#LastUpdateDate").attr("disabled", true);
        $("#RegistrationStatus").attr("disabled", true);
    }
        </script>


 

1 Answer, 1 is accepted

Sort by
0
Accepted
Richard Cuti
Top achievements
Rank 2
answered on 20 May 2013, 02:09 PM
And of course right after I posted this question I realized my issue was I was using .data("kendoDatePicker") when it was actually a DateTimePicker.
Tags
Date/Time Pickers
Asked by
Richard Cuti
Top achievements
Rank 2
Answers by
Richard Cuti
Top achievements
Rank 2
Share this question
or