Cal.comdesign-system

Schedule & Date Overrides

Weekly availability, exceptional date overrides, and minimum booking notice as one schedule-domain system.

Domain-owned availability editing: weekly hours (ScheduleComponent / DayRanges), exceptional dates (DateOverrideInputDialog + DateOverrideList), and minimum booking notice (MinimumBookingNoticeField). Callers own schedule persistence and shell chrome; the Feature package owns day-range editing and override UX.

Ownership

Feature — not @coss/ui/shared. Lives under packages/features/schedules/components because it depends on availability form shapes (TimeRange, working hours), react-hook-form field arrays, locale weekday names, and schedule-domain copy.

Coss chrome vs schedule behavior: pages wrap sections in Shared composites (CardFrame, Card, InfoTooltip, InlineEditableText, DurationUnitField). Do not recreate weekly day ranges or override calendars from those Shared pieces alone — import the Feature schedule controls.

Use when

  • Editing a user’s weekly availability or date overrides.
  • Wiring minimum booking notice on a schedule or event-type limits tab.
  • Reusing the same override dialog/list outside the full availability page (timezone-buddy sheet).

Do not reimplement Lexical-style mirrors of day ranges or override calendars in docs or product.

Canonical usage

Weekly schedule

AvailabilitySettings injects a Schedule component (web wraps ScheduleComponent with the user’s time format). Production weekly hours:

packages/features/schedules/components/availability-settings.tsx

Web injection (time format from the current user):

apps/web/modules/schedules/components/Schedule.tsx

DayRanges is the per-day range editor used inside ScheduleComponent and inside DateOverrideInputDialog for override hours — import from schedule-component, not as a standalone product page.

Date overrides

Same orchestrator composes add-dialog + list under Shared card chrome:

packages/features/schedules/components/availability-settings.tsx

Timezone-buddy reuses the same Feature pair without the full availability shell — see AvailabilityEditSheet.tsx.

Minimum booking notice

Schedule limits panel (when showScheduleLimits) and event-type limits both use the Feature field, which wraps Shared DurationUnitField and converts to minutes:

packages/features/schedules/components/availability-settings.tsx
packages/features/eventtypes/components/tabs/limits/EventLimitsTab.tsx

API (public entry points)

ScheduleComponent expects react-hook-form control + a name path to TimeRange[][], userTimeFormat, and optional weekStart / labels.

Call sites

Example URLs

Not exhaustive — a few places you can open locally (e.g. http://localhost:3000) to see this in product.

Source