Calendar Rules
What This Is
Calendar Rules are the scheduling rules that control which pickup or delivery dates are valid.
They are a real packaged admin feature in Settings > Calendar Rules, and they are one of the main ways Pyle prevents invalid shipping dates from being selected.
When You Would Use It
Use Calendar Rules when you need to:
- block invalid pickup or delivery days
- allow only certain weekdays
- add prerequisite rules for certain customers or shipping situations
- explain why a selected date is invalid and suggest the next valid date
Before You Start
Before you create or edit a Calendar Rule, make sure:
- you know which scheduling problem you are trying to solve
- you know whether the rule should be active immediately
- you understand whether the rule applies broadly or only under certain prerequisites
How To Use It In The Admin
- Go to
Settings > Calendar Rules. - Create a new rule with:
- English title
- French title
- entity type
- Open the rule detail page.
- Edit the basic information:
- bilingual title
- active or inactive state
- Add the conditions the rule needs:
- prerequisites
- validations
- operator
- condition-specific form values
- Save the rule and test a real shipping or pickup date flow that should be affected.
What It Changes In The Storefront
Calendar Rules change the storefront indirectly but very visibly.
They affect:
- which pickup dates are accepted
- which delivery dates are accepted
- the message shown when a user picks an invalid date
- the next valid date that can be suggested
Common Tasks
Create a weekday-only rule
Use validation conditions when pickup or delivery should only happen on specific days.
Activate or deactivate a rule
Turn a rule on only when you are ready for it to affect live date selection.
Add a customer-specific schedule
Use prerequisites when only certain customers or contexts should be affected.
Rules, Limits, And Things To Watch
- A rule can exist and still do nothing if it is inactive.
- Conditions matter as much as the title. The title alone is not the logic.
- Rules are evaluated in real date-selection flows, not only in settings.
Troubleshooting
The rule exists, but dates still are not blocked
Check that the rule is active and that the condition logic actually matches the shipment context you are testing.
Users see a validation error I did not expect
Review the rule conditions and test against the exact shipping service and shipment context being used.
Related Features
- Shipping Services
- Order shipment selection
- Fulfillment Requests
Sources
packages/admin/routes/web.phppackages/admin/src/Livewire/Admin/Settings/CalendarRulespackages/admin/src/Livewire/Admin/Settings/CalendarRulepackages/framework/src/Rules/CalendarRuleValidation.php