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

Commit bcf39ef

Browse files
bekospkozlowski-opensource
authored andcommittedJan 8, 2014
fix(timepicker): add correct type for meridian button
Closes #1541
1 parent 1933488 commit bcf39ef

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
 

‎src/timepicker/test/timepicker.spec.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,13 @@ describe('timepicker directive', function () {
136136
expect(getTimeState()).toEqual(['02', '39', 'PM']);
137137
expect(getModelState()).toEqual([14, 39]);
138138
});
139+
140+
it('meridian button has correct type', function() {
141+
var button = getMeridianButton();
142+
expect(button.attr('type')).toBe('button');
143+
});
139144

140-
it('toggles meridian when arrows are clicked', function() {
145+
it('toggles meridian when button is clicked', function() {
141146
var button = getMeridianButton();
142147

143148
doClick(button);

‎template/timepicker/timepicker.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<td style="width:50px;" class="form-group" ng-class="{'has-error': invalidMinutes}">
1515
<input type="text" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2">
1616
</td>
17-
<td ng-show="showMeridian"><button class="btn btn-default text-center" ng-click="toggleMeridian()">{{meridian}}</button></td>
17+
<td ng-show="showMeridian"><button type="button" class="btn btn-default text-center" ng-click="toggleMeridian()">{{meridian}}</button></td>
1818
</tr>
1919
<tr class="text-center">
2020
<td><a ng-click="decrementHours()" class="btn btn-link"><span class="glyphicon glyphicon-chevron-down"></span></a></td>

0 commit comments

Comments
 (0)