Skip to content

Commit 8929e4a

Browse files
committed
Merge remote-tracking branch 'remotes/trent/dev' into parseDateTime
2 parents e7c7d40 + a446965 commit 8929e4a

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

jquery-ui-timepicker-addon.js

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* jQuery timepicker addon
33
* By: Trent Richardson [http://trentrichardson.com]
4-
* Version 1.0.0-dev
4+
* Version 1.0.1-dev
55
* Last Modified: 02/05/2012
66
*
77
* Copyright 2012 Trent Richardson
@@ -20,7 +20,13 @@
2020

2121
(function($) {
2222

23-
$.extend($.ui, { timepicker: { version: "1.0.0" } });
23+
// Prevent "Uncaught RangeError: Maximum call stack size exceeded"
24+
$.ui.timepicker = $.ui.timepicker || {};
25+
if ($.ui.timepicker.version) {
26+
return;
27+
}
28+
29+
$.extend($.ui, { timepicker: { version: "1.0.1" } });
2430

2531
//#######################################################################################
2632
// Return regexp to parse possible am/pm time postfixes.
@@ -160,7 +166,7 @@ function Timepicker() {
160166
separator: ' ',
161167
altFieldTimeOnly: true,
162168
showTimepicker: true,
163-
timezoneIso8609: false,
169+
timezoneIso8601: false,
164170
timezoneList: null,
165171
addSliderAccess: false,
166172
sliderAccessArgs: null
@@ -248,7 +254,7 @@ $.extend(Timepicker.prototype, {
248254
var timezoneList = [];
249255
for (var i = -11; i <= 12; i++)
250256
timezoneList.push((i >= 0 ? '+' : '-') + ('0' + Math.abs(i).toString()).slice(-2) + '00');
251-
if (tp_inst._defaults.timezoneIso8609)
257+
if (tp_inst._defaults.timezoneIso8601)
252258
timezoneList = $.map(timezoneList, function(val) {
253259
return val == '+0000' ? 'Z' : (val.substring(0, 3) + ':' + val.substring(3));
254260
});
@@ -992,16 +998,16 @@ $.datepicker.parseTime = function(timeFormat, timeString, options) {
992998
var tz = treg[order.z].toUpperCase();
993999
switch (tz.length) {
9941000
case 1: // Z
995-
tz = o.timezoneIso8609 ? 'Z' : '+0000';
1001+
tz = o.timezoneIso8601 ? 'Z' : '+0000';
9961002
break;
9971003
case 5: // +hhmm
998-
if (o.timezoneIso8609)
1004+
if (o.timezoneIso8601)
9991005
tz = tz.substring(1) == '0000'
10001006
? 'Z'
10011007
: tz.substring(0, 3) + ':' + tz.substring(3);
10021008
break;
10031009
case 6: // +hh:mm
1004-
if (!o.timezoneIso8609)
1010+
if (!o.timezoneIso8601)
10051011
tz = tz == 'Z' || tz.substring(1) == '00:00'
10061012
? '+0000'
10071013
: tz.replace(/:/, '');
@@ -1186,7 +1192,7 @@ $.datepicker._gotoToday = function(id) {
11861192
tzoffset = Math.abs(tzoffset);
11871193
var tzmin = tzoffset % 60;
11881194
tzoffset = tzsign + ('0' + (tzoffset - tzmin) / 60).slice(-2) + ('0' + tzmin).slice(-2);
1189-
if (tp_inst._defaults.timezoneIso8609)
1195+
if (tp_inst._defaults.timezoneIso8601)
11901196
tzoffset = tzoffset.substring(0, 3) + ':' + tzoffset.substring(3);
11911197
tp_inst.timezone_select.val(tzoffset);
11921198
}
@@ -1404,6 +1410,6 @@ function extendRemove(target, props) {
14041410
};
14051411

14061412
$.timepicker = new Timepicker(); // singleton instance
1407-
$.timepicker.version = "1.0.0";
1413+
$.timepicker.version = "1.0.1";
14081414

14091415
})(jQuery);

0 commit comments

Comments
 (0)