![](/img/trans.png)
[英]Timezone Property of ngModelOptions of Angular-Ui Bootstrap Popup DatePicker
[英]angular-ui bootstrap datepicker (how to disable only today button on popup)
我有兩個日期:StartDate和EndDate使用angular-ui-bootstrap datepicker
當我選擇startDate(大於今天的日期)時,我在startDate中設置EndDate datepicker的最小日期。 所以所有日期<= startDate都被禁用。
但EnDate彈出窗口中的今日按鈕可以設置今天不符合業務規則的日期。
有沒有辦法禁用今天按鈕而不禁用所有按鈕欄?
你應該將ui-bootstrap版本更新為0.14.0或laster。 它可以修復這個錯誤。 https://github.com/angular-ui/bootstrap/pull/4199
示例HTMl:
ng-model,ng-change和min-date
<input type="text" uib-datepicker-popup="dd/MM/yyyy" ng-model="personForm.StartDate" name="startDate" ng-change="myStartDateChange()" />
<input type="text" uib-datepicker-popup="dd/MM/yyyy" min-date="endmindate" ng-model="personForm.EndDate" name="endDate" />
在控制器中添加功能:
$scope.myStartDateChange = function () {
$scope.endmindate= $scope.personForm.StartDate;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.