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

Limit Navigation to Months

The following example demonstrates how to limit the calendar navigation of the DateTimePicker to months (MVVM).

      <input data-role="datetimepicker" />

      $(function() {

        var elements = $(document.body).find("[data-role=datetimepicker]");

        elements.each(function() {
          .bind("open", function() {
            var calendar = this.dateView.calendar;

            if (calendar) {
              .bind("navigate", function(e) {
                var widget = e.sender;
                var viewName = widget.view().name;
                var disable = viewName == "month" && viewName !== "year";
                .toggleClass("k-state-disabled", disable)
                .attr("aria-disabled", disable);

See Also

In this article
Not finding the help you need? Improve this article