How can I block specific dates on Datepicker?

Hi there, this is my current code for picking a date for delivery:

$(document).ready( function() {
$(function() {
$(“#huratips-delivery-date”).datepicker( {
minDate: +1,
maxDate: ‘+2Y’,
beforeShowDay: jQuery.datepicker.noWeekends
} );
});
});

I need to block the following dates: June 30th, 2021 to July 7th, 2021

How do I add this to my code?

Thank you!

Hi @tcd2020

Hope you’re having a great day!

$(document).ready(function() {
  
  $(function() {
    
    var startDate = "2021-06-30", // some start date
    endDate  = "2021-07-07",  // some end date
    dateRange = [];           // array to hold the range
    
  	// populate the array
    for (var d = new Date(startDate); d <= new Date(endDate); d.setDate(d.getDate() + 1)) {
        dateRange.push($.datepicker.formatDate('yy-mm-dd', d));
    }
    
    $("#huratips-delivery-date").datepicker({
      minDate: +1,
      maxDate: '+2Y',
      beforeShowDay: function (date) {
      	var dateString = jQuery.datepicker.formatDate('yy-mm-dd', date);
        return [dateRange.indexOf(dateString) == -1];
      }
    });
  });
});

Let me know if your need help with it.