Skip to content

Commit bdafae6

Browse files
trentrichardson#843 and trentrichardson#845 - fix for clicking Now button
1 parent 4aac8f1 commit bdafae6

7 files changed

+20
-12
lines changed

dist/i18n/jquery-ui-timepicker-addon-i18n.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery Timepicker Addon - v1.6.1 - 2015-11-14
1+
/*! jQuery Timepicker Addon - v1.6.2 - 2015-11-14
22
* http://trentrichardson.com/examples/timepicker
33
* Copyright (c) 2015 Trent Richardson; Licensed MIT */
44

dist/i18n/jquery-ui-timepicker-addon-i18n.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ <h3>Requirements</h3>
113113

114114
<br />
115115
<h3>Version</h3>
116-
<p>Version 1.6.1</p>
116+
<p>Version 1.6.2</p>
117117

118118
<p>Last updated on 2015-11-14</p>
119119
<p>jQuery Timepicker Addon is currently available for use in all personal or commercial projects under the MIT license.</p>

dist/jquery-ui-timepicker-addon.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jQuery Timepicker Addon - v1.6.1 - 2015-11-14
1+
/*! jQuery Timepicker Addon - v1.6.2 - 2015-11-14
22
* http://trentrichardson.com/examples/timepicker
33
* Copyright (c) 2015 Trent Richardson; Licensed MIT */
44
(function (factory) {
@@ -22,7 +22,7 @@
2222
*/
2323
$.extend($.ui, {
2424
timepicker: {
25-
version: "1.6.1"
25+
version: "1.6.2"
2626
}
2727
});
2828

@@ -2059,10 +2059,14 @@
20592059
return 0;
20602060
}
20612061

2062-
if (!/^(\-|\+)\d{4}$/.test(normalized)) { // possibly a user defined tz, so just give it back
2062+
if(/^[a-zA-Z -]+$/.test(normalized)){ // possibly a user defined tz, so just give it back
20632063
return tzString;
20642064
}
20652065

2066+
if (!/^(\-|\+)\d{4}$/.test(normalized)) {
2067+
return parseInt(tzString, 10);
2068+
}
2069+
20662070
return ((normalized.substr(0, 1) === '-' ? -1 : 1) * // plus or minus
20672071
((parseInt(normalized.substr(1, 2), 10) * 60) + // hours (converted to minutes)
20682072
parseInt(normalized.substr(3, 2), 10))); // minutes
@@ -2258,6 +2262,6 @@
22582262
/*
22592263
* Keep up with the version
22602264
*/
2261-
$.timepicker.version = "1.6.1";
2265+
$.timepicker.version = "1.6.2";
22622266

22632267
}));

dist/jquery-ui-timepicker-addon.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jquery-ui-timepicker-addon.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jquery-ui-timepicker-addon.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -2065,10 +2065,14 @@
20652065
return 0;
20662066
}
20672067

2068-
if (!/^(\-|\+)\d{4}$/.test(normalized)) { // possibly a user defined tz, so just give it back
2068+
if(/^[a-zA-Z -]+$/.test(normalized)){ // possibly a user defined tz, so just give it back
20692069
return tzString;
20702070
}
20712071

2072+
if (!/^(\-|\+)\d{4}$/.test(normalized)) {
2073+
return parseInt(tzString, 10);
2074+
}
2075+
20722076
return ((normalized.substr(0, 1) === '-' ? -1 : 1) * // plus or minus
20732077
((parseInt(normalized.substr(1, 2), 10) * 60) + // hours (converted to minutes)
20742078
parseInt(normalized.substr(3, 2), 10))); // minutes

0 commit comments

Comments
 (0)