About
Month grid with free time slots and an async book button. From GooseUI (goosen-x/gooseui), MIT.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Booking Calendar to your project and fits it to your theme.
Code
How Booking Calendar is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client"
import * as React from "react"
import { BookingCalendar, type BookingSlots } from "@/components/ui/gooseui-booking-calendar"
const pad = (n: number) => String(n).padStart(2, "0")
const keyOf = (d: Date) =>
`${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`
const TIMES = ["09:00", "10:30", "12:00", "14:00", "15:30", "17:00", "18:30"]
// Neutral demo data: weekdays only, a different set of times per day
function buildSlots(days: number): BookingSlots {
const slots: BookingSlots = {}
const today = new Date()
for (let i = 1; i <= days; i++) {
const date = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate() + i,
)
const dow = date.getDay()
if (dow === 0 || dow === 6 || date.getDate() % 5 === 0) continue
slots[keyOf(date)] = TIMES.filter((_, t) => (t + date.getDate()) % 3 !== 0)
}
return slots
}
const wait = (ms: number) => new Promise((r) => setTimeout(r, ms))
export default function BookingCalendarDemo() {
const [slots] = React.useState(() => buildSlots(60))
const [today] = React.useState(() => new Date())
return (
<BookingCalendar
className="max-w-2xl"
slots={slots}
locale="en-US"
minDate={today}
note="Times are shown in your local time zone"
onBook={async () => {
await wait(1200)
}}
/>
)
}








