Skip to content

Commit ee87def

Browse files
committed
Datepicker: Use null instead of empty string when showing/hiding without a duration.
Fixes #5086 - no animation still animates.
1 parent 1e95c7f commit ee87def

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/jquery.ui.datepicker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ $.extend(Datepicker.prototype, {
644644
if ($.effects && $.effects[showAnim])
645645
inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
646646
else
647-
inst.dpDiv[showAnim || 'show']((showAnim ? duration : ''), postProcess);
647+
inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
648648
if (!showAnim)
649649
postProcess();
650650
if (inst.input[0].type != 'hidden')
@@ -754,7 +754,7 @@ $.extend(Datepicker.prototype, {
754754
inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
755755
else
756756
inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' :
757-
(showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : ''), postProcess);
757+
(showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess);
758758
if (!showAnim)
759759
postProcess();
760760
var onClose = this._get(inst, 'onClose');

0 commit comments

Comments
 (0)