0

I'm struggling a bit with disabling weekends and non working days in Kendo Date Picker with Angular

what I have so far is

 $scope.dtpFrmOptions = {
        change: startChange,
        format: "dd/MMM/yyyy",
        dates: $scope.holidaylist, //passing the disabledDays array to the template
        month: {
            // template for dates in month view
            content: '# if ($.inArray(+data.date, data.dates) != -1) { #' +
            '<div class="disabledDay">#= data.value #</div>' +
            '# } else { #' +
            '#= data.value #' +
            '# } #'
        },

        open: function (e) {
            $(".disabledDay").parent().removeClass("k-link") //removing this class makes the day unselectable
            $(".disabledDay").parent().removeAttr("href") //this removes the hyperlink styling
        }
    }

but since JQuery selection does not work properly with angular this doesnt seem working.

Anyone have a quick solution?

Sa E Chowdary
  • 2,075
  • 15
  • 31
GeoCoder
  • 5
  • 4
  • If you have jQuery included in your project, it should work normally. Just include it before you include your angular reference and it will see it exists and prevent the full load of jqLite. – beauXjames Aug 31 '15 at 17:00
  • I have jQuery included in my project – GeoCoder Aug 31 '15 at 17:04
  • Then it's either timing or your selectors. Without some sort of CodePen or jsFiddle, there is no quick solution. – beauXjames Aug 31 '15 at 17:10
  • http://stackoverflow.com/questions/22837789/disable-specific-dates-in-angularjs-date-picker –  Dec 10 '15 at 21:44

0 Answers0