Add a Delivery Date Picker to Your Cart Page

Add a Delivery Date Picker to Your Cart Page

You can include a calendar on your cart page that allows customers to specify a delivery date for their order.

This customization will not work for drawer or pop-up cart styles, and will only work for a cart page (at the URL 

If you use a cart drawer or pop-up, then you will need to change your cart style to Page in the theme editor. Add a product to the cart in the theme preview,  then click the Cart page tab in the theme editor to view your cart settings.

Include jQuery in your theme.liquid  .

For this customization to work, some themes require that a script tag for jQuery is added to the theme.liquid layout file. If you use Boundless, Debut version 17.2.0 or newer, Express, Narrative, or Venture, then you may need to follow the next step:

    • In the Layout directory, 
    • click theme.liquid.
    • Find the closing </head> tag in the code. On a new line above the closing </head> tag, paste the following code:
    • {{ ‘//’ | script_tag }}
      • Click Save

      Create a delivery date snippet  

      • To create a snippet for your delivery date picker
      •   From your Shopify admin, go to Online Store > Themes.
      •  Find the theme you want to edit, and then click Actions > Edit code.
      • In the Snippets directory, click Add a new snippet:
      • Create the snippet:
      • Name your snippet delivery-date
      • Click Create snippet. The new snippet file will open in the code editor.

      In your new delivery-date.liquid snippet, paste the following code: 

      { ‘//’ | stylesheet_tag }}

        <script src=”” defer=”defer”></script>

       <div style=”width:300px; clear:both;”>


      <label for=”date”>Pick a delivery date:</label>  <input id=”date” type=”text” name=”attributes2023″ value=”{{ }}” />

        <span style=”display:block” class=”instructions”> We do not deliver during the week-end.</span>




       window.onload = function() {

              if (window.jQuery) {

                  let $ = window.jQuery;       

                       $(function() {


                                        minDate: +1

                                     maxDate: ‘+2M’,

                  beforeShowDay: $.datepicker.noWeekends })      });

                            } }



      Leave A Comment


      Hello Business Owner
      Seeking E-commerce Expertise? Get Free Consultation Now!

      × How can I help you?