Note, as of now, in the newer version(from 1.1.0) onward of AngularUI Bootstrap, you have to use datepicker-options attribute to do the date disable as well as things like max/min date.
in the html control, add
datepicker-options="vm.dateOptions"
or datepicker-options="dateOptions" if you are not using controller as but $scope directly.
Then in your controller, define the dateOptions object.
vm.dateOptions = {
maxDate: new Date(),
dateDisabled: myDisabledDates
};
function myDisabledDates(dateAndMode) {
return ( dateAndMode.mode === 'day' && ( dateAndMode.date.getDay() === 0 || dateAndMode.date.getDay() === 6 ) );
}
!!!Notice!!! the function signature of the dateDisabled changed. Previously it accept a date object and a mode string. In the newer version, it is a wrapped object containing both.