使用 bootstrap 日期选择器方法和 AngularJS ui-date

Using bootstrap datepicker methods with AngularJS ui-date

我想在 bootstrap-datepicker 中使用 setDateDisabled 方法,但不确定如何在 angular 中使用它。

https://bootstrap-datepicker.readthedocs.org/en/latest/methods.html#setdatesdisabled

我成功地用

初始化了日期选择器
<input ui-date="datepickerOptions"  ng-model="rigDate.date" />

javascript这边

   $scope.datepickerOptions = {
            orientation: 'top',
            startDate: PayPeriodService.getStartDate(),
            endDate: PayPeriodService.getEndDate(),
            format: 'yyyy-mm-dd',
        };

使用 angular-ui

https://github.com/angular-ui/ui-date

我能够通过使用指令来使用 bootstrap 日期选择器,并在指令中使用 link 对象来使用 jquery 代码来操作日期选择器。