Datepicker: Handle empty string for animation duration.

Fixes #5259 - DatePicker will not ever close.
This commit is contained in:
Scott González 2010-03-03 01:31:04 +00:00
parent b2ef0fcc9e
commit c91e1cc86a

View File

@ -646,7 +646,7 @@ $.extend(Datepicker.prototype, {
inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
else
inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
if (!showAnim)
if (!showAnim || !duration)
postProcess();
if (inst.input.is(':visible') && !inst.input.is(':disabled'))
inst.input.focus();