Skip to content

Recurring Bookings

Recurring bookings let customers book a series of appointments at a regular cadence — weekly therapy sessions, biweekly coaching calls, monthly check-ups.

import { generateOccurrences } from "@thebookingkit/core";
const occurrences = generateOccurrences({
startDate: new Date("2026-03-10T14:00:00Z"),
endDate: new Date("2026-03-10T14:30:00Z"),
frequency: "weekly",
count: 8, // Generate 8 occurrences
timezone: "America/New_York",
});
// Returns: RecurringOccurrence[]
// Each has { start, end, occurrenceNumber }
FrequencyDescription
weeklySame day and time every week
biweeklyEvery two weeks
monthlySame day of month (or closest business day)
import { checkRecurringAvailability } from "@thebookingkit/core";
const result = checkRecurringAvailability(
occurrences,
rules,
overrides,
existingBookings,
);
// Returns: RecurringAvailabilityResult
// {
// allAvailable: false,
// availableOccurrences: [...],
// unavailableOccurrences: [{ occurrence, reason }],
// }

This checks every occurrence against the provider’s availability and existing bookings. Customers can then decide to book only the available occurrences or skip.

import { cancelFutureOccurrences } from "@thebookingkit/core";
const result = cancelFutureOccurrences(
seriesBookings,
new Date("2026-04-01"), // Cancel from this date onward
);
// Returns: SeriesCancellationResult
// { cancelled: [...], kept: [...] }
import { RecurringBookingPicker } from "./components/recurring-booking-picker";
<RecurringBookingPicker
frequencies={["weekly", "biweekly", "monthly"]}
maxOccurrences={12}
occurrences={generatedOccurrences}
onFrequencyChange={handleFrequencyChange}
onCountChange={handleCountChange}
/>