New to Kendo UI for jQuery? Download free 30-day trial

Disable Months And Years


Product Version 2022.1.119
Product Progress® Kendo UI® DatePicker for jQuery


The disableDates configuration provides the functionality to disable certain days in the month view of the DatePicker. This article demonstates how to disable months and years as well.


  1. Initialize two arrays that will hold the disabled months and years.
  2. Attach a handler to the open event of the DatePicker.
  3. Inside the open event, retrieve a reference to the underlying Calendar widget.
  4. Attach a handler to the navigate event of the Calendar.
  5. Perform a conditional check to find out which view is currently open.
    • If the year view is open, iterate over the array of months.
    • If the decade view is open, iterate over the array of years.
  6. Find the corresponding HTML element and add the k-disabled class to manually disable the month or year.
    <input id="datepicker" />
      const disabledMonths = ["Jan", "Apr"],
            disabledYears = [2020, 2024, 2027];

      var datePicker = $("#datepicker").kendoDatePicker({
        value: new Date()
      }).getKendoDatePicker();"open", function() {
        let calendar = this.dateView.calendar;

        calendar.bind("navigate", function(e) {
          let view = e.sender.view();

          if( === "year") {
            for(let i=0; i<disabledMonths.length; i++) {
              let month = disabledMonths[i];

          if( === "decade") {
            for(let i=0; i<disabledYears.length; i++) {
              let year = disabledYears[i];
In this article