Skip to content

Commit 3ac151f

Browse files
Check for tp_inst in gotoToday
1 parent 0ec258f commit 3ac151f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jquery-ui-timepicker-addon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ $.datepicker._gotoToday = function(id) {
10691069
this._base_gotoToday(id);
10701070
var now = new Date();
10711071
var tp_inst = this._get(inst, 'timepicker');
1072-
if (tp_inst._defaults.showTimezone && tp_inst.timezone_select) {
1072+
if (tp_inst && tp_inst._defaults.showTimezone && tp_inst.timezone_select) {
10731073
var tzoffset = now.getTimezoneOffset(); // If +0100, returns -60
10741074
var tzsign = tzoffset > 0 ? '-' : '+';
10751075
tzoffset = Math.abs(tzoffset);

0 commit comments

Comments
 (0)