src/components/datepicker/js/dateUtil.js
function isDateWithinRange(date, minDate, maxDate) {
       var dateAtMidnight = createDateAtMidnight(date);
       var minDateAtMidnight = isValidDate(minDate) ? createDateAtMidnight(minDate) : null;
       var maxDateAtMidnight = isValidDate(maxDate) ? createDateAtMidnight(maxDate) : null;
       return (!minDateAtMidnight || minDateAtMidnight <= dateAtMidnight) &&
           (!maxDateAtMidnight || maxDateAtMidnight >= dateAtMidnight);
     }
function isDateWithinRange(date, minDate, maxDate) {
       var dateAtMidnight = createDateAtMidnight(date);
       var minDateAtMidnight = isValidDate(minDate) ? createDateAtMidnight(minDate) : null;
       var maxDateAtMidnight = isValidDate(maxDate) ? createDateAtMidnight(maxDate) : null;
       return (!minDateAtMidnight || minDateAtMidnight <= dateAtMidnight) &&
           (!maxDateAtMidnight || maxDateAtMidnight >= dateAtMidnight);
     }
function isDateWithinRange ( date , minDate , maxDate ) { var dateAtMidnight = createDateAtMidnight ( date ) ; var minDateAtMidnight = isValidDate ( minDate ) ? createDateAtMidnight ( minDate ) : null ; var maxDateAtMidnight = isValidDate ( maxDate ) ? createDateAtMidnight ( maxDate ) : null ; return ( ! minDateAtMidnight || minDateAtMidnight <= dateAtMidnight ) && ( ! maxDateAtMidnight || maxDateAtMidnight >= dateAtMidnight ) ; }
Checks if a date is within a min and max range, ignoring the time component.
If minDate or maxDate are not dates, they are ignored.
@param {Date} date
@param {Date} minDate
@param {Date} maxDate
Checks if a date is within a min and max range ignoring the time component . If minDate or maxDate are not dates they are ignored .