AngularJS Datetime- Picker 只能选择一天
AngularJS Datetime- Picker only one day selectable
是否可以仅例如启用星期一 - 并显示所有其他日期。
非常感谢。
<p class="input-group">
<input type="text"
class="form-control"
name="test"
ng-model="vm.test"
datepicker-popup="dd.MM.yyyy"
is-open="vm.openedDatePickerFrom"
close-text="schließen"
current-text="heute"
clear-text="löschen">
<span class="input-group-btn">
<button type="button" class="btn btn-default"
ng-click="vm.openDatePickerFrom($event)"><span
class="glyphicon glyphicon-calendar"></span></button>
</span>
</p>
将 date-disabled
属性添加到输入中:
date-disabled="disabled(date, mode)"
date-disabled (date, mode) (Default: null) : An optional expression to
disable visible options based on passing date and current mode
(day|month|year).
只允许星期一:
$scope.disabled = function(date, mode) {
return mode === 'day' && date.getDay() !== 1;
};
是否可以仅例如启用星期一 - 并显示所有其他日期。
非常感谢。
<p class="input-group">
<input type="text"
class="form-control"
name="test"
ng-model="vm.test"
datepicker-popup="dd.MM.yyyy"
is-open="vm.openedDatePickerFrom"
close-text="schließen"
current-text="heute"
clear-text="löschen">
<span class="input-group-btn">
<button type="button" class="btn btn-default"
ng-click="vm.openDatePickerFrom($event)"><span
class="glyphicon glyphicon-calendar"></span></button>
</span>
</p>
将 date-disabled
属性添加到输入中:
date-disabled="disabled(date, mode)"
date-disabled (date, mode) (Default: null) : An optional expression to disable visible options based on passing date and current mode (day|month|year).
只允许星期一:
$scope.disabled = function(date, mode) {
return mode === 'day' && date.getDay() !== 1;
};