I am using Angular UI Bootstrap as the latest versions.
I would love to have a callback when it changes view, so when I switch from May to June. I need this because of the following scenario:
My datepicker shows available and inaccessible dates with the customClass function. I retrieve all the features of the current month, but when I click next or previous, I don't have a callback to get the new features available.
Also, I don't want to call asynchronously 42 times (one for each class), because you will also have a lot of synchronization issues in datepicker. I hope that someone knows how to achieve this, I have been looking for a solution for a long time.
My HTML:
<div class="input-group"> <span class="input-group-addon" ng-click="vm.OpenDatepicker($event,'1')"><i class="ti-calendar"></i></span> <input type="text" class="form-control" datepicker-options="dpOptions" readonly style="cursor:pointer; background-color:white;" uib-datepicker-popup="dd-MMMM-yyyy" min-date="minDate" show-weeks="true" ng-model="selectedDate" is-open="vm.$scope.datepickers[1]" show-button-bar="false" ng-click="vm.OpenDatepicker($event,'1')" /> </div>
In the parameters $ scope.dpOptions (DatePicker Options), I determined what user classes should be:
$scope.dpOptions.customClass= function (data) {
source share