@@ -51,14 +51,14 @@ angular.module('ui.bootstrap.timepicker', [])
51
51
var hourStep = timepickerConfig . hourStep ;
52
52
if ( $attrs . hourStep ) {
53
53
$scope . $parent . $watch ( $parse ( $attrs . hourStep ) , function ( value ) {
54
- hourStep = parseInt ( value , 10 ) ;
54
+ hourStep = Number ( value ) ;
55
55
} ) ;
56
56
}
57
57
58
58
var minuteStep = timepickerConfig . minuteStep ;
59
59
if ( $attrs . minuteStep ) {
60
60
$scope . $parent . $watch ( $parse ( $attrs . minuteStep ) , function ( value ) {
61
- minuteStep = parseInt ( value , 10 ) ;
61
+ minuteStep = Number ( value ) ;
62
62
} ) ;
63
63
}
64
64
@@ -128,7 +128,7 @@ angular.module('ui.bootstrap.timepicker', [])
128
128
var secondStep = timepickerConfig . secondStep ;
129
129
if ( $attrs . secondStep ) {
130
130
$scope . $parent . $watch ( $parse ( $attrs . secondStep ) , function ( value ) {
131
- secondStep = parseInt ( value , 10 ) ;
131
+ secondStep = Number ( value ) ;
132
132
} ) ;
133
133
}
134
134
@@ -160,7 +160,7 @@ angular.module('ui.bootstrap.timepicker', [])
160
160
161
161
// Get $scope.hours in 24H mode if valid
162
162
function getHoursFromTemplate ( ) {
163
- var hours = parseInt ( $scope . hours , 10 ) ;
163
+ var hours = Number ( $scope . hours ) ;
164
164
var valid = $scope . showMeridian ? hours > 0 && hours < 13 :
165
165
hours >= 0 && hours < 24 ;
166
166
if ( ! valid ) {
@@ -179,12 +179,12 @@ angular.module('ui.bootstrap.timepicker', [])
179
179
}
180
180
181
181
function getMinutesFromTemplate ( ) {
182
- var minutes = parseInt ( $scope . minutes , 10 ) ;
182
+ var minutes = Number ( $scope . minutes ) ;
183
183
return minutes >= 0 && minutes < 60 ? minutes : undefined ;
184
184
}
185
185
186
186
function getSecondsFromTemplate ( ) {
187
- var seconds = parseInt ( $scope . seconds , 10 ) ;
187
+ var seconds = Number ( $scope . seconds ) ;
188
188
return seconds >= 0 && seconds < 60 ? seconds : undefined ;
189
189
}
190
190
0 commit comments