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

Commit 169c504

Browse files
aitboudadwesleycho
authored andcommitted
docs(datepicker): remove popup example.
Closes #5755
1 parent 38a334c commit 169c504

File tree

2 files changed

+3
-58
lines changed

2 files changed

+3
-58
lines changed

src/datepicker/docs/demo.html

+1-27
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,7 @@
1515

1616
<h4>Inline</h4>
1717
<div style="display:inline-block; min-height:290px;">
18-
<uib-datepicker ng-model="dt" class="well well-sm" datepicker-options="inlineOptions"></uib-datepicker>
19-
</div>
20-
21-
<h4>Popup</h4>
22-
<div class="row">
23-
<div class="col-md-6">
24-
<p class="input-group">
25-
<input type="text" class="form-control" uib-datepicker-popup="{{format}}" ng-model="dt" is-open="popup1.opened" datepicker-options="dateOptions" ng-required="true" close-text="Close" alt-input-formats="altInputFormats" />
26-
<span class="input-group-btn">
27-
<button type="button" class="btn btn-default" ng-click="open1()"><i class="glyphicon glyphicon-calendar"></i></button>
28-
</span>
29-
</p>
30-
</div>
31-
32-
<div class="col-md-6">
33-
<p class="input-group">
34-
<input type="text" class="form-control" uib-datepicker-popup ng-model="dt" is-open="popup2.opened" datepicker-options="dateOptions" ng-required="true" close-text="Close" />
35-
<span class="input-group-btn">
36-
<button type="button" class="btn btn-default" ng-click="open2()"><i class="glyphicon glyphicon-calendar"></i></button>
37-
</span>
38-
</p>
39-
</div>
40-
</div>
41-
<div class="row">
42-
<div class="col-md-6">
43-
<label>Format: <span class="muted-text">(manual alternate <em>{{altInputFormats[0]}}</em>)</span></label> <select class="form-control" ng-model="format" ng-options="f for f in formats"><option></option></select>
44-
</div>
18+
<uib-datepicker ng-model="dt" class="well well-sm" datepicker-options="options"></uib-datepicker>
4519
</div>
4620

4721
<hr />

src/datepicker/docs/demo.js

+2-31
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,12 @@ angular.module('ui.bootstrap.demo').controller('DatepickerDemoCtrl', function ($
88
$scope.dt = null;
99
};
1010

11-
$scope.inlineOptions = {
11+
$scope.options = {
1212
customClass: getDayClass,
1313
minDate: new Date(),
1414
showWeeks: true
1515
};
1616

17-
$scope.dateOptions = {
18-
dateDisabled: disabled,
19-
formatYear: 'yy',
20-
maxDate: new Date(2020, 5, 22),
21-
minDate: new Date(),
22-
startingDay: 1
23-
};
24-
2517
// Disable weekend selection
2618
function disabled(data) {
2719
var date = data.date,
@@ -30,36 +22,15 @@ angular.module('ui.bootstrap.demo').controller('DatepickerDemoCtrl', function ($
3022
}
3123

3224
$scope.toggleMin = function() {
33-
$scope.inlineOptions.minDate = $scope.inlineOptions.minDate ? null : new Date();
34-
$scope.dateOptions.minDate = $scope.inlineOptions.minDate;
25+
$scope.options.minDate = $scope.options.minDate ? null : new Date();
3526
};
3627

3728
$scope.toggleMin();
3829

39-
$scope.open1 = function() {
40-
$scope.popup1.opened = true;
41-
};
42-
43-
$scope.open2 = function() {
44-
$scope.popup2.opened = true;
45-
};
46-
4730
$scope.setDate = function(year, month, day) {
4831
$scope.dt = new Date(year, month, day);
4932
};
5033

51-
$scope.formats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate'];
52-
$scope.format = $scope.formats[0];
53-
$scope.altInputFormats = ['M!/d!/yyyy'];
54-
55-
$scope.popup1 = {
56-
opened: false
57-
};
58-
59-
$scope.popup2 = {
60-
opened: false
61-
};
62-
6334
var tomorrow = new Date();
6435
tomorrow.setDate(tomorrow.getDate() + 1);
6536
var afterTomorrow = new Date(tomorrow);

0 commit comments

Comments
 (0)