# V calendar 8

> Appointment Booking

A shadcn/ui block from the [@cnippet](https://ui.cnippet.dev/) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/cnippet/v-calendar-8).

- Page, with a live preview: https://shadcn.exchange/r/cnippet/v-calendar-8
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/cnippet/v-calendar-8-light-8e363e6b1d9fd25c.png
- Registry item: https://ui.cnippet.dev/r/v-calendar-8.json
- Categories: calendar
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.cnippet.dev/r/v-calendar-8.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `@cnippet/calendar`

## Files

### `registry/default/variants/v-calendar-8.tsx`

```tsx
"use client";

import * as React from "react";
import { Calendar } from "@/registry/default/ui/calendar";

const today = new Date();
today.setHours(0, 0, 0, 0);

// Simulate fully-booked dates
const y = today.getFullYear();
const m = today.getMonth();
const bookedDates = [
  new Date(y, m, 8),
  new Date(y, m, 9),
  new Date(y, m, 15),
  new Date(y, m, 22),
  new Date(y, m + 1, 5),
  new Date(y, m + 1, 12),
];

export default function Particle() {
  const [date, setDate] = React.useState<Date | undefined>();

  return (
    <div className="flex flex-col gap-3">
      <Calendar
        disabled={[{ before: today }, { dayOfWeek: [0, 6] }, ...bookedDates]}
        mode="single"
        onSelect={setDate}
        selected={date}
      />
      <div className="rounded-lg border px-4 py-3 text-sm">
        {date ? (
          <p>
            Appointment:{" "}
            <span className="font-semibold">
              {date.toLocaleDateString("en-US", {
                day: "numeric",
                month: "long",
                weekday: "long",
              })}
            </span>
          </p>
        ) : (
          <p className="text-muted-foreground">
            Weekdays only · Greyed-out dates are fully booked.
          </p>
        )}
      </div>
    </div>
  );
}
```
