We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 594747f commit a4136a6Copy full SHA for a4136a6
jquery-ui-timepicker-addon.js
@@ -1183,7 +1183,7 @@
1183
case 'H':
1184
return hour;
1185
case 'hh':
1186
- return convert24to12(hour).slice(-2);
+ return ('0' + convert24to12(hour)).slice(-2);
1187
case 'h':
1188
return convert24to12(hour);
1189
case 'mm':
@@ -1649,7 +1649,7 @@
1649
1650
/*
1651
* Converts 24 hour format into 12 hour
1652
- * Returns 12 hour with leading 0
+ * Returns 12 hour without leading 0
1653
*/
1654
var convert24to12 = function(hour) {
1655
if (hour > 12) {
@@ -1660,10 +1660,6 @@
1660
hour = 12;
1661
}
1662
1663
- if (hour < 10) {
1664
- hour = "0" + hour;
1665
- }
1666
-
1667
return String(hour);
1668
};
1669
0 commit comments