dist/js/datepicker.js
function (date, type) {
            var time = date.getTime(),
                d = datepicker.getParsedDate(date),
                min = datepicker.getParsedDate(this.minDate),
                max = datepicker.getParsedDate(this.maxDate),
                dMinTime = new Date(d.year, d.month, min.date).getTime(),
                dMaxTime = new Date(d.year, d.month, max.date).getTime(),
                types = {
                    day: time >= this.minTime && time <= this.maxTime,
                    month: dMinTime >= this.minTime && dMaxTime <= this.maxTime,
                    year: d.year >= min.year && d.year <= max.year
                };
            return type ? types[type] : types.day
        }
function (date, type) {
            var time = date.getTime(),
                d = datepicker.getParsedDate(date),
                min = datepicker.getParsedDate(this.minDate),
                max = datepicker.getParsedDate(this.maxDate),
                dMinTime = new Date(d.year, d.month, min.date).getTime(),
                dMaxTime = new Date(d.year, d.month, max.date).getTime(),
                types = {
                    day: time >= this.minTime && time <= this.maxTime,
                    month: dMinTime >= this.minTime && dMaxTime <= this.maxTime,
                    year: d.year >= min.year && d.year <= max.year
                };
            return type ? types[type] : types.day
        }
function ( date , type ) { var time = date . getTime ( ) , d = datepicker . getParsedDate ( date ) , min = datepicker . getParsedDate ( this . minDate ) , max = datepicker . getParsedDate ( this . maxDate ) , dMinTime = new Date ( d . year , d . month , min . date ) . getTime ( ) , dMaxTime = new Date ( d . year , d . month , max . date ) . getTime ( ) , types = { day : time >= this . minTime && time <= this . maxTime , month : dMinTime >= this . minTime && dMaxTime <= this . maxTime , year : d . year >= min . year && d . year <= max . year } ; return type ? types [ type ] : types . day }
Check if date is between minDate and maxDate
@param date {object} - date object
@param type {string} - cell type
@returns {boolean}
@private
Check if date is between minDate and maxDate