Delivery date picker - Allow weekends

Highlighted
New Member
3 0 0

Hi

 

We followed this tutorial https://shopify.dev/tutorials/customize-theme-add-date-picker-for-delivery-dates to add the delivery date picker but it blocks out weekend. 

 

How do we allow weekend dates to be picked?

 

Website is https://the-doorstep-grocer.myshopify.com/cart

0 Likes
Highlighted
Shopify Partner
1235 5 87

This bit of code:

 

  $(document).ready( function() {
    $(function() {
      $("#date").datepicker( {
        minDate: +1,
        maxDate: '+2M',
        beforeShowDay: jQuery.datepicker.noWeekends
      } );
    });
  });

Needs to be like this:

  $(document).ready( function() {
    $(function() {
      $("#date").datepicker( {
        minDate: +1,
        maxDate: '+2M'
      } );
    });
  });

HTH, Gavin.

 

www.bookthatapp.com
0 Likes
Highlighted
New Member
3 0 0

Thank you for your help. When I use this code, it takes away the calendar and just leaves a blank box that you write text into. 

0 Likes
Highlighted
Shopify Partner
1235 5 87

Sounds like there might be a Javascript error happening. Do you see anything in the console?

www.bookthatapp.com
0 Likes
Highlighted
New Member
1 0 0

Hi, 

 

How do I add just saturday up until 2pm? and no deliveries on sunday? 

 

Many thanks

0 Likes