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

Commit

Permalink
docs(datepicker): fix 2009-08-24 button
Browse files Browse the repository at this point in the history
- Fix button in demo for setting the date

Closes #4587
  • Loading branch information
wesleycho committed Oct 11, 2015
1 parent 70be195 commit a09275a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/datepicker/docs/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h4>Popup</h4>

<hr />
<button type="button" class="btn btn-sm btn-info" ng-click="today()">Today</button>
<button type="button" class="btn btn-sm btn-default" ng-click="dt = '2009-08-24'">2009-08-24</button>
<button type="button" class="btn btn-sm btn-default" ng-click="setDate(2009, 7, 24)">2009-08-24</button>
<button type="button" class="btn btn-sm btn-danger" ng-click="clear()">Clear</button>
<button type="button" class="btn btn-sm btn-default" ng-click="toggleMin()" uib-tooltip="After today restriction">Min date</button>
</div>
4 changes: 4 additions & 0 deletions src/datepicker/docs/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ angular.module('ui.bootstrap.demo').controller('DatepickerDemoCtrl', function ($
$scope.status.opened = true;
};

$scope.setDate = function(year, month, day) {
$scope.dt = new Date(year, month, day);
};

$scope.dateOptions = {
formatYear: 'yy',
startingDay: 1
Expand Down

0 comments on commit a09275a

Please sign in to comment.