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

Commit 1760c8d

Browse files
committed
feat(datepicker): alt-input-formats demo as scope var
1 parent 1af5690 commit 1760c8d

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" uib-datepicker-popup="{{format}}" ng-model="dt" is-open="popup1.opened" min-date="minDate" max-date="maxDate" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" alt-input-formats="['MMM d! yyyy']" />
25+
<input type="text" class="form-control" uib-datepicker-popup="{{format}}" ng-model="dt" is-open="popup1.opened" min-date="minDate" max-date="maxDate" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" alt-input-formats="altInputFormats" />
2626
<span class="input-group-btn">
2727
<button type="button" class="btn btn-default" ng-click="open1()"><i class="glyphicon glyphicon-calendar"></i></button>
2828
</span>
@@ -40,7 +40,7 @@ <h4>Popup</h4>
4040
</div>
4141
<div class="row">
4242
<div class="col-md-6">
43-
<label>Format: <span class="muted-text">(manual alternate <em>MMM d! yyyy</em>)</span></label> <select class="form-control" ng-model="format" ng-options="f for f in formats"><option></option></select>
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>
4444
</div>
4545
</div>
4646

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

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ angular.module('ui.bootstrap.demo').controller('DatepickerDemoCtrl', function ($
3939

4040
$scope.formats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate'];
4141
$scope.format = $scope.formats[0];
42+
$scope.altInputFormats = ['MMM d! yyyy'];
4243

4344
$scope.popup1 = {
4445
opened: false

0 commit comments

Comments
 (0)