diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index 01bb88c..c03282b 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -556,10 +556,11 @@ $.fn.extend({ if (typeof(o) == 'string'){ if(o == 'getDate') - return $.fn.datepicker.apply($(this), tmp_args); + return $.fn.datepicker.apply($(this[0]), tmp_args); else return this.each(function() { - $.fn.datepicker.apply($(this), tmp_args); + var $t = $(this); + $t.datepicker.apply($t, tmp_args); }); } else