1
需要一些幫助。我有一個html5本機代碼的日期選擇器。 代碼看起來像這樣如何使用angularjs指令禁用html 5 datepicker中的日期數組
<input name="cidt" type="date" id="cidate" ng-model="reserve.ci" min="{{today}}" required ng-change="getMinCo()" disableDates>
而且該指令
myapp.directive('disableDates', function(){
return function(scope, element, attrs){
var disableddates = ["2016-07-14","2016-07-15"];
//need to code here
}
});
注:angularjs使用jqlite修改元素的屬性。但沒有參考可以找到更改此輸入類型的具體日期,除了最小值和最大值。
我只需要弄清楚如何從被選中禁用這些日期。無法在Google上找到任何資源。任何幫助讚賞。