2016-06-20 23 views

回答

0

我假設你正在使用Angular-UI的Datepicker指令。 date-disabled屬性可讓您禁用某些日期(例如週末)。看到這個plunk here

如果你想根據選擇動態禁用日期,你可以使用min和max屬性和觀察者。見here

+0

我已經禁用了它們,但並不隱藏導航箭頭我想隱藏它 –

+0

爲此,您可以在指令中找到'btn pull-left'類並將css添加爲'display:none'。 –

+0

這將隱藏它所有月份我只想隱藏它在一年後的幾個月 –

0

回答我的問題的情況下,這可以幫助任何人,我結束了使用混入模式如下所述:http://moduscreate.com/angularjs-tricks-with-angular-extend/

和示例代碼 角 .module(「ui.bootstrap.datepicker」) .controller(Ctrl鍵,功能($範圍){

angular.extend($scope, angular.module('ui.bootstrap.datepicker').controller('DatepickerController').$scope); 
angular.extend($scope, { 
    hideYearNav: function(){ 
     // the function body goes in here 
    } 
}); 

});

相關問題