Skip to content

Commit ac0cc2f

Browse files
gnarfscottgonzalez
authored andcommitted
Datepicker: Updated to check for new or old style effects (see #7103).
1 parent d64c9ef commit ac0cc2f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ui/jquery.ui.datepicker.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,9 @@ $.extend(Datepicker.prototype, {
656656
}
657657
};
658658
inst.dpDiv.zIndex($(input).zIndex()+1);
659-
if ($.effects && $.effects[showAnim])
659+
660+
// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
661+
if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) )
660662
inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
661663
else
662664
inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
@@ -781,7 +783,9 @@ $.extend(Datepicker.prototype, {
781783
$.datepicker._tidyDialog(inst);
782784
this._curInst = null;
783785
};
784-
if ($.effects && $.effects[showAnim])
786+
787+
// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
788+
if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) )
785789
inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
786790
else
787791
inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' :

0 commit comments

Comments
 (0)