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

Commit

Permalink
refactor(datepicker): track buttons by date instead of $index
Browse files Browse the repository at this point in the history
  • Loading branch information
bekos committed Feb 13, 2014
1 parent c5862b0 commit c01d255
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion template/datepicker/day.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<tbody>
<tr ng-repeat="row in rows track by $index">
<td ng-show="showWeeks" class="text-center"><small><em>{{ weekNumbers[$index] }}</em></small></td>
<td ng-repeat="dt in row track by $index" class="text-center">
<td ng-repeat="dt in row track by dt.date" class="text-center">
<button type="button" style="width:100%;" class="btn btn-default btn-sm" ng-class="{'btn-info': dt.selected}" ng-click="select(dt.date)" ng-disabled="dt.disabled"><span ng-class="{'text-muted': dt.secondary, 'text-info': dt.current}">{{dt.label}}</span></button>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion template/datepicker/month.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</thead>
<tbody>
<tr ng-repeat="row in rows track by $index">
<td ng-repeat="dt in row track by $index" class="text-center">
<td ng-repeat="dt in row track by dt.date" class="text-center">
<button type="button" style="width:100%;" class="btn btn-default" ng-class="{'btn-info': dt.selected}" ng-click="select(dt.date)" ng-disabled="dt.disabled"><span ng-class="{'text-info': dt.current}">{{dt.label}}</span></button>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion template/datepicker/year.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</thead>
<tbody>
<tr ng-repeat="row in rows track by $index">
<td ng-repeat="dt in row track by $index" class="text-center">
<td ng-repeat="dt in row track by dt.date" class="text-center">
<button type="button" style="width:100%;" class="btn btn-default" ng-class="{'btn-info': dt.selected}" ng-click="select(dt.date)" ng-disabled="dt.disabled"><span ng-class="{'text-info': dt.current}">{{dt.label}}</span></button>
</td>
</tr>
Expand Down

0 comments on commit c01d255

Please sign in to comment.