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

On this page
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 a free Shopify Online Store 2.0 theme, then you might need to follow the next step:
In theLayoutdirectory, click
theme.liquid
.Findthe closing
tag in the code. On a new line above the closing
tag, paste the following code:
{{'//ajax.googleapis.com/ajax/libs/jquery/2.2.3/jquery.min.js'|script_tag}}
- ClickSave.
Create a delivery date snippet
To create a snippet for your delivery date picker:
From your Shopify admin, go to欧宝体育官网入口首页>Themes.
Find the theme you want to edit, click the...button to open the actions menu, and then clickEdit code.
From theShopify app,挖掘Store.
In theSales channelssection, tap欧宝体育官网入口首页.
TapManage themes.
Find the theme you want to edit, click the...button to open the actions menu, and then clickEdit code.
From theShopify app,挖掘Store.
In theSales channelssection, tap欧宝体育官网入口首页.
TapManage themes.
Find the theme you want to edit, click the...button to open the actions menu, and then clickEdit code.
In theSnippetsdirectory, clickAdd a new snippet:
Create the snippet:
- Name your snippet
delivery-date
. - ClickCreate snippet. The new snippet file will open in the code editor.
- Name your snippet
In your new
delivery-date.liquid
snippet, paste the following code:
{{ '//code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css' | stylesheet_tag }}<跨class="nt"><脚本src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"defer="defer">style="width:300px; clear:both;">id="date"type="text"name="attributes[date]"value="{{ cart.attributes.date }}"/><跨style="display:block"class="instructions">We do not deliver during the weekend.<跨class="nt">