Skip to content
Permalink
Browse files

Fixed 3191 NaN causes breakage for relative dates

  • Loading branch information
Keith Wood
Keith Wood committed Aug 21, 2008
1 parent 426c5e1 commit c5635d6350a64ed62b5770b5a46eb5623c34fc9d
Showing with 3 additions and 2 deletions.
  1. +3 −2 ui/ui.datepicker.js
@@ -1244,9 +1244,10 @@ $.extend(Datepicker.prototype, {
}
return new Date(year, month, day);
};
return (date == null ? defaultDate :
date = (date == null ? defaultDate :
(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. */

0 comments on commit c5635d6

Please sign in to comment.
You can’t perform that action at this time.