A delivery date picker shows dates. Validation enforces them. On Shopify, validation means a Cart and Checkout Validation Function: a check that runs on Shopify's servers before payment and stops the order if the date is missing, closed or full. It runs on every Shopify plan and on every way into checkout, including Shop Pay, Apple Pay and Buy it now. Only a picker shown inside the checkout page needs Plus.
Why a picker alone lets bad dates through
A picker on the product or cart page is a display. It greys out closed and full dates in the customer's browser, and that's all. Orders still get through without a valid date when:
- The customer uses an express button. Buy it now, Shop Pay, Apple Pay and Google Pay on the product page go straight to checkout, so the cart picker never runs. See Buy It Now skips the delivery date.
- The date filled up while they were paying. The picker showed "1 left" when the page loaded. Someone else took it.
- The cart is from yesterday. They picked a date, came back after the cutoff and checked out.
- The cart drawer doesn't show the picker, or the theme changed and the picker block was removed.
- Someone edits the cart's delivery date by hand or with a script.
Shopify's own free option, a date picker added to the cart page with theme code, has the same gap: it collects a date but nothing checks it at checkout.
The checks delivery date validation should run
These are the checks OrderRules runs at checkout, with the message the customer sees by default:
| Check | What it catches | Default message |
|---|---|---|
| Date required | No date at all, often from Buy it now or Shop Pay | Please choose a delivery date before checking out. |
| Date allowed | Past dates, inside the lead time or after the cutoff, on a weekday you don't deliver, beyond your booking horizon | That delivery date is no longer available. Please choose another. |
| Closed date | A blackout date, such as a holiday | We don't deliver on the selected date. Please choose another. |
| Day full | The date has reached your maximum orders per delivery date | Delivery on {date} is fully booked. Please choose another date. |
| Time slot | No slot chosen, or the slot is full | Please choose a delivery time. / That delivery time is full. Please choose another. |
| Product cap per date | More units of a product than are left for that date | Only {n} left for delivery on {date}. Please reduce the quantity or choose another date. |
| Method | Pickup-only and delivery-only items mixed, or the wrong method | Some items in your cart require different fulfillment methods and can't be purchased together. |
| Pickup | No pickup date, location or time; a closed or full pickup day or slot | Please choose a pickup date before checking out. (and five more) |
If an app's checkout check covers only the first row, it stops dateless orders but not overbooked ones.
Three ways to get validation on Shopify
1. Build your own validation Function. A developer writes a Cart and Checkout Validation Function that reads the cart's delivery date and returns an error if it isn't allowed. It runs on every plan. A Function can't look up a database while it runs, so your allowed dates and booked counts have to be written to a metafield beforehand and kept up to date. That's most of the work. Shopify's validation Functions explained covers the mechanics.
2. Use a date picker app with checkout validation. Ask five questions before you install:
- Does it use a Cart and Checkout Validation Function, or only theme JavaScript?
- Does it stop Buy it now, Shop Pay and Apple Pay orders without a date?
- Which Shopify plans does the check run on?
- Does it recheck full dates and slots at checkout, or only hide them in the picker?
- Can you edit the messages, in every language you sell in?
Our comparison of delivery date picker apps marks which apps enforce at checkout and which only display.
3. On Shopify Plus, put the picker inside checkout. A checkout UI extension shows the calendar on the checkout page, so express buyers see it too. It's still only a display: pair it with a validation Function, or a date can be skipped or stale.
Set it up in OrderRules
- On the Advanced plan, open your availability rule and turn on Require a delivery date at checkout (and Require a time slot if you use slots).
- In Shopify, open Settings β Checkout, scroll to Checkout rules and check the OrderRules rule is on.
- Set what validation checks: Maximum orders per delivery date, Cap/day on each time slot, product limits counted by Delivery date, and blackout dates.
- In Checkout messages, edit any message or apply a language pack.
- Test with no date, a closed date and a full date, through the cart, Buy it now and Shop Pay. A development store is the safest place to try it first.
What validation can't catch
- Two checkouts in the same second for the last place can both go through. Validation reads what's booked; it doesn't hold a lock.
- Right after a cutoff, a date can pass checkout for a short time until the app refreshes its list of allowed dates. The picker on the page drops the date straight away.
- Orders that skip checkout aren't checked: Shopify POS, subscription renewals, orders created in admin and marked as paid, and orders from other apps or the Admin API. They still count toward your caps.
- Edits after purchase. Changing an order's date in Shopify admin isn't checked and doesn't move its place.
- Postcodes and zones. OrderRules doesn't check the address. To stop delivering to an area, leave it out of your Shopify shipping zones.
More in compatibility and known limitations.