diff --git a/dcalendar.picker.js b/dcalendar.picker.js index 3d6cf01..2f273b7 100644 --- a/dcalendar.picker.js +++ b/dcalendar.picker.js @@ -169,7 +169,8 @@ if (typeof jQuery === 'undefined') { throw new Error('DCalendar.Picker: This plu }, /* Determines if date is disabled */ disabledDate: function (date) { - var that = this, rangeFrom = null, rangeTo = null, rangeMin = null, rangeMax = null, min = null, max = null; + var that = this, rangeFrom = null, rangeTo = null, rangeMin = null, rangeMax = null, min = null, max = null, + now = new Date(), today = new Date(now.getFullYear(), now.getMonth(), now.getDate()); if (that.minDate) min = that.minDate === "today" ? today : new Date(that.minDate); if (that.maxDate) max = that.maxDate === "today" ? today : new Date(that.maxDate);