r2444 - Datepicker: Removed more remnants of range select functionality

r2444 - Datepicker: Removed more remnants of range select functionality


Author: kbwood.au
Date: Fri Apr 10 01:05:51 2009
New Revision: 2444
Modified:
trunk/ui/ui.datepicker.js
Log:
Datepicker: Removed more remnants of range select functionality
Modified: trunk/ui/ui.datepicker.js
==============================================================================
--- trunk/ui/ui.datepicker.js    (original)
+++ trunk/ui/ui.datepicker.js    Fri Apr 10 01:05:51 2009
@@ -1250,7 +1250,7 @@
        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 @@
        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 @@
    /* 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));
    },