Edit this page

Disable Dates in Calendar Dynamically

Environment

Product Progress Kendo UI Calendar
Made with version 2017.3.1026

Description

How can I disable dates in the Calendar after the widget was initialized?

Solution

  1. Destroy the Calendar by using the destroy method.
  2. Initialize the Calendar with the disabled dates.
    <div id="calendar"></div>
    <a class="k-button" onclick="changeDisableDates()">Disable dates</a>
    <script>
      $("#calendar").kendoCalendar();

      function changeDisableDates() {
        var calendar = $('#calendar').data('kendoCalendar');
        var options = calendar.options;
        options.disableDates = ["mo", "sa"];

        calendar.destroy();
        $('#calendar').html('');
        $('#calendar').kendoCalendar(options);
      }
    </script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy