diff options
author | Trent Richardson <trentdrichardson@gmail.com> | 2012-11-06 12:40:17 -0500 |
---|---|---|
committer | Trent Richardson <trentdrichardson@gmail.com> | 2012-11-06 12:40:17 -0500 |
commit | a4136a67513b5030a03d3d3b1c96d61c2d5ddd4a (patch) | |
tree | 831e2afb81346e65fffb03e2fbe8d2c4e0deeb6c /jquery-ui-timepicker-addon.js | |
parent | 594747fe91a36d00295d522680bf8ed70d17f50a (diff) | |
download | jQuery-Timepicker-Addon-a4136a67513b5030a03d3d3b1c96d61c2d5ddd4a.zip jQuery-Timepicker-Addon-a4136a67513b5030a03d3d3b1c96d61c2d5ddd4a.tar.gz jQuery-Timepicker-Addon-a4136a67513b5030a03d3d3b1c96d61c2d5ddd4a.tar.bz2 |
Fixes #497 problem with timeFormat h
Diffstat (limited to 'jquery-ui-timepicker-addon.js')
-rw-r--r-- | jquery-ui-timepicker-addon.js | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index bb6ea68..8e37d76 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -1183,7 +1183,7 @@ case 'H': return hour; case 'hh': - return convert24to12(hour).slice(-2); + return ('0' + convert24to12(hour)).slice(-2); case 'h': return convert24to12(hour); case 'mm': @@ -1649,7 +1649,7 @@ /* * Converts 24 hour format into 12 hour - * Returns 12 hour with leading 0 + * Returns 12 hour without leading 0 */ var convert24to12 = function(hour) { if (hour > 12) { @@ -1660,10 +1660,6 @@ hour = 12; } - if (hour < 10) { - hour = "0" + hour; - } - return String(hour); }; |