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

Commit

Permalink
fix(timepicker): Stringify pad return when value >= 10
Browse files Browse the repository at this point in the history
In some cases, the increment function becomes invalid because the
minutes are invalid. This change ensures that the value returned is a
string
  • Loading branch information
Alexandre David authored and Wesley Cho committed Mar 23, 2015
1 parent f7b4428 commit 405dab6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/timepicker/timepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ angular.module('ui.bootstrap.timepicker', [])
}

function pad( value ) {
return ( angular.isDefined(value) && value.toString().length < 2 ) ? '0' + value : value;
return ( angular.isDefined(value) && value.toString().length < 2 ) ? '0' + value : value.toString();
}

// Respond on mousewheel spin
Expand Down

0 comments on commit 405dab6

Please sign in to comment.