From 405dab65f72f5bed488eb8f5dfa5a1a848c4a606 Mon Sep 17 00:00:00 2001 From: Alexandre David Date: Mon, 13 Oct 2014 11:04:28 +0200 Subject: [PATCH] fix(timepicker): Stringify pad return when value >= 10 In some cases, the increment function becomes invalid because the minutes are invalid. This change ensures that the value returned is a string --- src/timepicker/timepicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timepicker/timepicker.js b/src/timepicker/timepicker.js index 8738224160..ee69d3f86c 100644 --- a/src/timepicker/timepicker.js +++ b/src/timepicker/timepicker.js @@ -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