Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 0b03a01

Browse files
committed
chore(datepicker): fix model for max date in demo
1 parent 432b4eb commit 0b03a01

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: src/datepicker/docs/demo.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ <h4>Popup</h4>
2222
<div class="row">
2323
<div class="col-md-6">
2424
<p class="input-group">
25-
<input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt" is-open="status.opened" min-date="minDate" max-date="'2020-06-22'" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" />
25+
<input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt" is-open="status.opened" min-date="minDate" max-date="maxDate" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" />
2626
<span class="input-group-btn">
2727
<button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
2828
</span>
@@ -31,7 +31,7 @@ <h4>Popup</h4>
3131

3232
<div class="col-md-6">
3333
<p class="input-group">
34-
<input type="date" class="form-control" datepicker-popup ng-model="dt" is-open="status.opened" min-date="minDate" max-date="'2020-06-22'" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" />
34+
<input type="date" class="form-control" datepicker-popup ng-model="dt" is-open="status.opened" min-date="minDate" max-date="maxDate" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" />
3535
<span class="input-group-btn">
3636
<button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
3737
</span>

Diff for: src/datepicker/docs/demo.js

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ angular.module('ui.bootstrap.demo').controller('DatepickerDemoCtrl', function ($
1717
$scope.minDate = $scope.minDate ? null : new Date();
1818
};
1919
$scope.toggleMin();
20+
$scope.maxDate = new Date(2020, 5, 22);
2021

2122
$scope.open = function($event) {
2223
$scope.status.opened = true;

0 commit comments

Comments
 (0)