From 3ac151fe8c6b96c112b274bc096f2ace4b63cc7e Mon Sep 17 00:00:00 2001 From: Trent Date: Wed, 14 Dec 2011 08:13:01 -0500 Subject: [PATCH] Check for tp_inst in gotoToday --- jquery-ui-timepicker-addon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index c69dee8..a639a3c 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -1069,7 +1069,7 @@ $.datepicker._gotoToday = function(id) { this._base_gotoToday(id); var now = new Date(); var tp_inst = this._get(inst, 'timepicker'); - if (tp_inst._defaults.showTimezone && tp_inst.timezone_select) { + if (tp_inst && tp_inst._defaults.showTimezone && tp_inst.timezone_select) { var tzoffset = now.getTimezoneOffset(); // If +0100, returns -60 var tzsign = tzoffset > 0 ? '-' : '+'; tzoffset = Math.abs(tzoffset);