Disable dates in the checkout date picker
In short
Open your Date Picker block and add rules under Disabled Date rules. Use Day of the week for weekends, Specific Date or Date Range for holidays, Dynamic for today or tomorrow, and Date Before or Date After for fixed limits. For cut-off times and lead times, use a Custom Liquid Expression that outputs dates, day names or ranges separated by commas.
✓ Applies to
- The Date Picker block
- Advanced and Deluxe plans
✕ Doesn't apply to
- Shopify's own delivery date or local delivery settings
- Limiting how many orders can book the same date
Before you start
- A Date Picker block, set up as in the Date Picker guide.
- A list of the dates to block: closed weekdays, holidays, lead time and any cut-off time.
Steps
- In Checkout Ninja, open your block under Blocks and click the Date Picker to edit it.
- Under Disabled Date rules, add a rule.
- Choose its Type and fill in its fields, using the table below.
- Repeat for each rule. A date is disabled if any rule matches it.
- Click Done, then Save.
Rule types
| Type | Fields | What it disables |
|---|---|---|
| Day of the week | Day | That weekday, every week. One day per rule. |
| Specific Date | Date | That one date. |
| Date Range | Start Date, End Date | Every date from start to end, including both. |
| Date Before | Date | Every date up to and including that date. |
| Date After | Date | That date and every date after it. |
| Dynamic (current day,next day, etc) | Type: Current Day, Next Day, Previous Day, All days before today | Worked out each time checkout loads. All days before today also disables today. |
| Custom Liquid Expression | Friendly Name, Expression | Whatever the expression outputs. Friendly Name is only a label for you. |
For date fields, click the date button and choose a date. The button shows today’s date before you pick, but no date is saved until you click one, and the rule has no effect.
Custom Liquid Expression recipes
The expression must output text that checkout understands. Separate several values with commas:
- a date:
2026-12-25 - a day name:
Saturday - a range, both ends included:
2026-12-24--2027-01-02 - an open range:
--2026-10-01(up to and including) or2026-10-01--(from, onwards) - a whole month:
2026-12
You can use the variable currentDateTime, the current date and time. The date filter formats it in the buyer’s device time zone. Supported tags are assign, if / elsif / else, unless and for.
Disable weekends and holidays in one rule
Saturday, Sunday, 2026-12-25, 2027-01-01
Disable tomorrow after a 12:00 cut-off
{% assign hour = currentDateTime | date: "%H" %}
{% if hour >= 12 %}
{{ currentDateTime | date: "%s" | plus: 86400 | times: 1000 | date: "%Y-%m-%d" }}
{% endif %}
Change 12 to your cut-off hour, in 24-hour time.
After 12:00 on Friday, disable next Monday
{% assign hour = currentDateTime | date: "%H" %}
{% assign day = currentDateTime | date: "%A" %}
{% if day == "Friday" and hour >= 12 %}
{{ currentDateTime | date: "%s" | plus: 259200 | times: 1000 | date: "%Y-%m-%d" }}
{% endif %}
Two-day lead time (disable everything up to two days from now)
--{{ currentDateTime | date: "%s" | plus: 172800 | times: 1000 | date: "%Y-%m-%d" }}
To add days, add 86400 per day to the number after plus:. Keep times: 1000 before the last date filter: it turns seconds into the milliseconds the filter expects.
Verify it worked
- Open your checkout and find the calendar.
- Each disabled date is greyed out and can’t be selected.
- Check the boundaries: the start and end dates of a Date Range, and the date you chose for Date Before or Date After, are disabled.
- For a cut-off recipe, test it with an hour that has already passed today (for example
hour >= 0), check tomorrow is disabled, then set your real hour back. - Negative check: a date that no rule covers can still be picked.
Limitations
- Dynamic rules use the UTC date. Around midnight, “today” can differ from your local date.
- Liquid recipes use the buyer’s device clock and time zone, not your store’s.
- Rules only change the calendar. The Date Picker has no Required setting, so a buyer can still check out without picking a date.
- There’s no capacity limit. Any number of orders can pick the same date.
- The Liquid engine is a small subset:
capture,caseand JSON output aren’t supported. Older examples that output JSON arrays or ranges don’t work in the current checkout.
Troubleshooting
A Liquid rule disables nothing.
The output must be plain dates, day names or ranges separated by commas. JSON such as ["Saturday","Sunday"] isn’t read. Remove | json and capture, and output the values directly.
The cut-off recipe disables a date in 1970.
The times: 1000 step is missing. Date arithmetic is in seconds, and the date filter needs milliseconds.
The wrong day is disabled near midnight. Dynamic rules use UTC, and Liquid uses the buyer’s time zone. If your buyers are far from UTC, use a Liquid rule instead of a Dynamic one.
Frequently asked
How do I disable weekends? +
Add two Day of the week rules, one for Saturday and one for Sunday. Each rule takes one day.
How do I stop same-day and next-day orders? +
Add a Dynamic rule set to All days before today (this also disables today) and another set to Next Day. For a longer lead time, use the lead-time Liquid recipe on this page.
Can I disable tomorrow only after a cut-off time? +
Yes, with a Custom Liquid Expression. The cut-off recipe on this page disables tomorrow once the buyer's clock passes 12:00. Change 12 to your cut-off hour.
Are the boundary dates included? +
Yes. Date Range disables both its start and end dates, Date Before disables the chosen date too, and Date After disables the chosen date onwards.