mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Fixed 3191 NaN causes breakage for relative dates
This commit is contained in:
parent
426c5e1fc7
commit
c5635d6350
@ -1244,9 +1244,10 @@ $.extend(Datepicker.prototype, {
|
|||||||
}
|
}
|
||||||
return new Date(year, month, day);
|
return new Date(year, month, day);
|
||||||
};
|
};
|
||||||
return (date == null ? defaultDate :
|
date = (date == null ? defaultDate :
|
||||||
(typeof date == 'string' ? offsetString(date, this._getDaysInMonth) :
|
(typeof date == 'string' ? offsetString(date, this._getDaysInMonth) :
|
||||||
(typeof date == 'number' ? offsetNumeric(date) : date)));
|
(typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : date)));
|
||||||
|
return (date && date.toString() == 'Invalid Date' ? defaultDate : date);
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Set the date(s) directly. */
|
/* Set the date(s) directly. */
|
||||||
|
Loading…
Reference in New Issue
Block a user