下面是我的控制器和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