Tweaked how to call option methods

This commit is contained in:
Trent Richardson 2010-12-14 09:06:26 -05:00
parent 2084e23da9
commit 2f96131641

View file

@ -556,10 +556,11 @@ $.fn.extend({
if (typeof(o) == 'string'){ if (typeof(o) == 'string'){
if(o == 'getDate') if(o == 'getDate')
return $.fn.datepicker.apply($(this), tmp_args); return $.fn.datepicker.apply($(this[0]), tmp_args);
else else
return this.each(function() { return this.each(function() {
$.fn.datepicker.apply($(this), tmp_args); var $t = $(this);
$t.datepicker.apply($t, tmp_args);
}); });
} }
else else