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;
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. */
/* 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));
},