Skip to content

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

  1. Go to Settings > Calendar Rules.
  2. Create a new rule with:
    • English title
    • French title
    • entity type
  3. Open the rule detail page.
  4. Edit the basic information:
    • bilingual title
    • active or inactive state
  5. Add the conditions the rule needs:
    • prerequisites
    • validations
    • operator
    • condition-specific form values
  6. 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.

  • Shipping Services
  • Order shipment selection
  • Fulfillment Requests

Sources

  • packages/admin/routes/web.php
  • packages/admin/src/Livewire/Admin/Settings/CalendarRules
  • packages/admin/src/Livewire/Admin/Settings/CalendarRule
  • packages/framework/src/Rules/CalendarRuleValidation.php