Skip to content
Permalink
Browse files

Datepicker: Removed more remnants of range select functionality

  • Loading branch information
Keith Wood
Keith Wood committed Apr 10, 2009
1 parent f754cf1 commit 0375dcb04a90ae98a2d1c9fcf11df37e313c7776
Showing with 5 additions and 11 deletions.
  1. +5 −11 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));
},

0 comments on commit 0375dcb

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