Availability Editor

Weekly hours with several ranges a day, date overrides, buffers, minimum notice and how far ahead people can book.

Weekly hours

  • Unavailable
  • Unavailable

Date overrides

Days with other hours, or off: holidays, a conference, a late start.

  • Thu, Dec 24, 2026Unavailable
  • Thu, Dec 31, 2026

Booking rules

Time zone

The zone these hours are in.

The soonest a booking can start.

Free time kept before each booking.

Free time kept after each booking.

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/availability-editor

Usage

import { Availability } from "./ui/uicontext/components/schedule/Availability.ts"import { AvailabilityEditor } from "./ui/uicontext/components/schedule/AvailabilityEditor.ts"
const Message = UiSchema.TaggedEnum({ RequestedAvailability: { value: Availability } })// store the whole value it asks for, and save itexport const Hours = (h: Html.H<typeof Message.Type>, value: Availability, now: string) =>	AvailabilityEditor(h, { props: { value, now }, onEmit: { RequestedChange: ({ value: next }) => Message.RequestedAvailability({ value: next }) } })

API reference

Props

AvailabilityEditor props
NameTypeDefaultDescription
valuerequiredAvailability——
nowrequiredstring—The app's current instant (ISO): today for the override picker, offsets for the zone list
localestring——
hour12boolean——
stepInt15Minutes between the times offered; 15 by default
hoursOnlyboolean—Hide buffers, notice and the booking window: for a person's working hours rather than a booking page
disabledboolean——

Events

AvailabilityEditor events
EventPayloadDescription
RequestedChange{ value: Availability }The whole new value: store it and pass it back as value

Source