code: function isMonthWithinRange(date, minDate, maxDate) {
         var month = date.getMonth();
         var year = date.getFullYear();
  
         return (!minDate || minDate.getFullYear() < year || minDate.getMonth() <= month) &&
          (!maxDate || maxDate.getFullYear() > year || maxDate.getMonth() >= month);
       }
docs: Checks if a month is within a min and max range, ignoring the date and time components.
  If minDate or maxDate are not dates, they are ignored.
  @param {Date} date
  @param {Date} minDate
  @param {Date} maxDate