0
votes

I added this code to my shopify site http://docs.shopify.com/manual/configuration/store-customization/page-specific/cart-page/capture-delivery-date. It works great, but I can't figure out how to turn off some days. I don't deliver overnight or even 2 day, so I want to disable the ability for customers to choose days that are today's date + the following 7 days.

1

1 Answers

0
votes

You can adjust the min and max dates in your delivery-date.liquid snippet.

To set the minimum date to today's date + 7 days (instead of +1 day in the sample code provided):

jQuery("#date").datepicker( { 
  minDate: +7, 
  maxDate: "+2M"
} );

See the jQuery UI docs for more info on minDate and maxDate.

You can also disable weekends:

jQuery("#date").datepicker( { 
  minDate: +7, 
  maxDate: "+2M",
  beforeShowDay: $.datepicker.noWeekends
} );

...or disable specific days.