0
<input id="startDate" kendo-date-time-picker
           k-ng-model="vm.startDate"
           k-on-change="vm.updateStartDate()"
           required
/>

How to add disabled dates to this date picker? Not using jquery !! Is there a attribute as k-disabled-dates?

1
  • when i followed regular methods like min and max i had seen some wired behavior like dates are disappearing from picker,check this by moving to November and January dojo.telerik.com/alEqu Commented Dec 23, 2016 at 6:53

1 Answer 1

1

Specify the k-options attribute:

<input id="startDate" kendo-date-time-picker
       k-ng-model="vm.startDate"
       k-on-change="vm.updateStartDate()"
       required,
       k-options="startDateOptions"
/>

And then implement the options with the disabledDates(http://docs.telerik.com/kendo-ui/api/javascript/ui/datetimepicker#configuration-disableDates) config specified however is appropriate for your situation, i.e.

$scope.startDateOptions = {
    disableDates: function (date) {
        var disabled = [13,14,20,21];
        if (date && disabled.indexOf(date.getDate()) > -1 ) {
            return true;
        } else {
            return false;
        }
    }
};

Example: http://dojo.telerik.com/@Stephen/eLuWE

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.