How do disable and enable several datetime pickers...

2 posts, 0 answers
  1. Michael
    Michael avatar
    6 posts
    Member since:
    Jan 2013

    Posted 14 Feb 2013 Link to this post

    Is there an easy way to enumerate through a list of controls such as datetime pickers or numeric controls and call the enable() method on them without specifying the id? Essentially I want to disable and enable a group of controls in a div.

    Thanks!
  2. Michael
    Michael avatar
    6 posts
    Member since:
    Jan 2013

    Posted 14 Feb 2013 Link to this post

    There may be an easier way to do this but here is what I came up with:
    $("." + className + " input[type='date']").each(function () {
     
                        var datePicker = $("#" + this.id).data("kendoDatePicker");
     
                        if (datePicker) {
                            datePicker.enable();
                        }
                    });
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top