我正在使用angular ui引导库中的angular ui日期选择器小部件(
http://angular-ui.github.io/bootstrap/
). 默认情况下,日期选择器只允许启用今天或以后的日期。今天之前的所有日期都被禁用。我希望启用日期选择器上的所有日期。我该怎么做?请告知。
以下站点显示了如何仅禁用周末。
http://angular-ui.github.io/bootstrap/
我更改了范围功能(从该站点),以便启用所有周末。但所有日期(工作日和周末)
之前
今天仍然是残疾人。
我的代码更新了$scope的控制器。disabled()函数:
$scope.disabled = function (date, mode) {
return false;
};
下面是我使用日期选择器小部件的标记:
<input type="text" id="textSearchUpdatedDate"
uib-datepicker-popup="{{format}}" ng-model="updatedDateChangeText"
ng-change="searchUpdatedDateChanged()" ng-keyup="searchUpdatedDateChanged()"
is-open="status.opened"
min-date="minDate"
max-date="maxDate"
datepicker-options="dateOptions"
date-disabled="disabled(date, mode)"
ng-required="true"
close-text="Close" />
<button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>