下面是我的控制器和html代碼,我正在實施日期,並且有人可以向我解釋如何向下面的代碼添加maxdate和mindate。如何在uib-datepicker中設置maxdate和mindate
app.controller('viewfullproductionsummaryController', function ($scope, productionService, usSpinnerService) {
$scope.open1 = function() { $scope.popup1.opened = true; };
$scope.popup1 = { opened: false };
$scope.data = {};
$scope.data.ProductionReportDate = new Date();
});
<div class="col-md-2 inputGroupContainer">
<div class="input-group">
<span class="input-group-btn">
<button type="button" class="btn btn-default" ng-click="open1()"><i class="glyphicon glyphicon-calendar"></i></button>
</span>
<input type="text" class="form-control" uib-datepicker-popup="dd-MMM-yyyy" ng-model="data.ProductionReportDate" is-open="popup1.opened" required close-text="Close" />
</div>
</div>
我試圖採取的但他們不工作。你能告訴我用excat代碼如何實現? – Ranger
我已經更新了我的答案,看看 –
非常感謝Nishant。它爲我工作... :))) – Ranger