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

Commit

Permalink
fix(timepicker): add correct type for meridian button
Browse files Browse the repository at this point in the history
Closes #1541
  • Loading branch information
bekos authored and pkozlowski-opensource committed Jan 8, 2014
1 parent 1933488 commit bcf39ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/timepicker/test/timepicker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,13 @@ describe('timepicker directive', function () {
expect(getTimeState()).toEqual(['02', '39', 'PM']);
expect(getModelState()).toEqual([14, 39]);
});

it('meridian button has correct type', function() {
var button = getMeridianButton();
expect(button.attr('type')).toBe('button');
});

it('toggles meridian when arrows are clicked', function() {
it('toggles meridian when button is clicked', function() {
var button = getMeridianButton();

doClick(button);
Expand Down
2 changes: 1 addition & 1 deletion template/timepicker/timepicker.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<td style="width:50px;" class="form-group" ng-class="{'has-error': invalidMinutes}">
<input type="text" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2">
</td>
<td ng-show="showMeridian"><button class="btn btn-default text-center" ng-click="toggleMeridian()">{{meridian}}</button></td>
<td ng-show="showMeridian"><button type="button" class="btn btn-default text-center" ng-click="toggleMeridian()">{{meridian}}</button></td>
</tr>
<tr class="text-center">
<td><a ng-click="decrementHours()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"></span></a></td>
Expand Down

0 comments on commit bcf39ef

Please sign in to comment.