diff options
author | Keith Wood <kbwood.au@gmail.com> | 2009-04-10 08:05:51 +0000 |
---|---|---|
committer | Keith Wood <kbwood.au@gmail.com> | 2009-04-10 08:05:51 +0000 |
commit | 0375dcb04a90ae98a2d1c9fcf11df37e313c7776 (patch) | |
tree | f038df0573cf47d6cae47b133d3f5f2be4ec0c69 /ui | |
parent | f754cf11119fae0ee34c8b4aaa5d321b170901d4 (diff) | |
download | jquery-ui-0375dcb04a90ae98a2d1c9fcf11df37e313c7776.tar.gz jquery-ui-0375dcb04a90ae98a2d1c9fcf11df37e313c7776.zip |
Datepicker: Removed more remnants of range select functionality
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.datepicker.js | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/ui/ui.datepicker.js b/ui/ui.datepicker.js index e41bcb414..aa1830501 100644 --- a/ui/ui.datepicker.js +++ b/ui/ui.datepicker.js @@ -1250,7 +1250,7 @@ $.extend(Datepicker.prototype, { var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1); var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) : new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); - var minDate = this._getMinMaxDate(inst, 'min', true); + var minDate = this._getMinMaxDate(inst, 'min'); var maxDate = this._getMinMaxDate(inst, 'max'); var drawMonth = inst.drawMonth - showCurrentAtPos; var drawYear = inst.drawYear; @@ -1498,11 +1498,9 @@ $.extend(Datepicker.prototype, { return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths)); }, - /* Determine the current maximum date - ensure no time components are set - may be overridden for a range. */ - _getMinMaxDate: function(inst, minMax, checkRange) { - var date = this._determineDate(this._get(inst, minMax + 'Date'), null); - return (!checkRange || !inst.rangeStart ? date : - (!date || inst.rangeStart > date ? inst.rangeStart : date)); + /* Determine the current maximum date - ensure no time components are set. */ + _getMinMaxDate: function(inst, minMax) { + return this._determineDate(this._get(inst, minMax + 'Date'), null); }, /* Find the number of days in a given month. */ @@ -1527,11 +1525,7 @@ $.extend(Datepicker.prototype, { /* Is the given date in the accepted range? */ _isInRange: function(inst, date) { - // during range selection, use minimum of selected date and range start - var newMinDate = (!inst.rangeStart ? null : this._daylightSavingAdjust( - new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay))); - newMinDate = (newMinDate && inst.rangeStart < newMinDate ? inst.rangeStart : newMinDate); - var minDate = newMinDate || this._getMinMaxDate(inst, 'min'); + var minDate = this._getMinMaxDate(inst, 'min'); var maxDate = this._getMinMaxDate(inst, 'max'); return ((!minDate || date >= minDate) && (!maxDate || date <= maxDate)); }, |