From faec5be2c69f304fbb64ce0a6699034a544c51bd Mon Sep 17 00:00:00 2001 From: Trent Richardson Date: Wed, 5 Jan 2011 09:43:38 -0500 Subject: [PATCH] Added timepicker inst as parameter to relevant events --- jquery-ui-timepicker-addon.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index 876287c..acb9dcd 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -125,21 +125,21 @@ $.extend(Timepicker.prototype, { } } tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, o, { - beforeShow: function(input, dp_inst) { + beforeShow: function(input, dp_inst) { if ($.isFunction(o.beforeShow)) - o.beforeShow(input, dp_inst); + o.beforeShow(input, dp_inst, tp_inst); }, onChangeMonthYear: function(year, month, dp_inst) { // Update the time as well : this prevents the time from disappearing from the $input field. tp_inst._updateDateTime(dp_inst); if ($.isFunction(o.onChangeMonthYear)) - o.onChangeMonthYear(year, month, dp_inst); + o.onChangeMonthYear(year, month, dp_inst, tp_inst); }, onClose: function(dateText, dp_inst) { if (tp_inst.timeDefined === true && $input.val() != '') tp_inst._updateDateTime(dp_inst); if ($.isFunction(o.onClose)) - o.onClose(dateText, dp_inst); + o.onClose(dateText, dp_inst, tp_inst); }, timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker'); });