We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9415cd commit baaa834Copy full SHA for baaa834
src/jquery-ui-timepicker-addon.js
@@ -1246,7 +1246,7 @@
1246
case 'c':
1247
return '(\\d?\\d?\\d)';
1248
case 'z':
1249
- return '(z|[-+]\\d\\d:?\\d\\d|\\S+)?';
+ return '(z|[-+]\\d\\d(:?\\d\\d)?|\\S+)?';
1250
case 't':
1251
return getPatternAmpm(o.amNames, o.pmNames);
1252
default: // literal escaped in quotes
@@ -2089,6 +2089,10 @@
2089
if (normalized.toUpperCase() === 'Z') { // if iso8601 with Z, its 0 minute offset
2090
return 0;
2091
}
2092
+
2093
+ if (/^(\-|\+)\d{2}$/.test(normalized)) {
2094
+ normalized += "00"; // hours-only string - add the minutes
2095
+ }
2096
2097
if (!/^(\-|\+)\d{4}$/.test(normalized)) { // possibly a user defined tz, so just give it back
2098
return parseInt(tzString, 10);
0 commit comments