npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-calendar.json --yesCalendar
ProA month always in view, to choose a date or a range of dates, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
import { useState } from 'react';
import { Calendar } from '@/components/ui/goop/calendar';
import type { DatePickerRange } from '@/components/ui/goop/date-picker';
function SurveyWeek() {
const [week, setWeek] = useState<DatePickerRange | null>(null);
return (
<Calendar
aria-label="Survey dates"
mode="range"
maxNights={6}
value={week}
onValueChange={setWeek}
disabledDays={{ dayOfWeek: [0] }}
/>
);
}Pick a look. Month: pick a delivery day; past days, Sundays and one closing day are refused. Range and Two months: pick a start, point at a later day to see the band it would make, and pick its end. Rules: a booking of two to six nights that never crosses the closed day. Dropdowns: a date of birth, decades back through the caption’s month and year lists. The arrows move by day, PageUp and PageDown by month. Nothing is delivered or booked; the closing days are our own, counted from today.
When to use
- A month always in view, to choose a date or a range of dates.
- Also called: month view or date grid.
When not to use
- For a field that opens on a press, use DatePicker.
Installation
Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Calendar on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-calendar.json --yesAdd the Goop Calendar to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { useState } from 'react';
import { Calendar } from '@/components/ui/goop/calendar';
import type { DatePickerRange } from '@/components/ui/goop/date-picker';
function SurveyWeek() {
const [week, setWeek] = useState<DatePickerRange | null>(null);
return (
<Calendar
aria-label="Survey dates"
mode="range"
maxNights={6}
value={week}
onValueChange={setWeek}
disabledDays={{ dayOfWeek: [0] }}
/>
);
}- Fits: schedule, flow: aside.
- height, width, background, text: add no class for these.
API reference
| Option | Type | What it does |
|---|---|---|
| disabled? | boolean | Whether the calendar is disabled: every day refused and both arrows held, each in its disabled look. |
| mode? | 'single' | 'range' = 'single' | One date is chosen at a time (the default). Or: A range of dates is chosen: a first press its start, a second its end in date order, a third starts over. |
| value? | Date | null | DatePickerRange | null | The chosen date, when the caller holds it (null for none); with onValueChange. Or: The chosen range, when the caller holds it (null for none); with onValueChange. |
| defaultValue? | Date | DatePickerRange | The date chosen at first, when the calendar holds it. Or: The range chosen at first, when the calendar holds it. |
| onValueChange? | ((value: Date | null) => void) | ((value: DatePickerRange | null) => void) | Called with the date chosen, or null when it is pressed again. Or: Called with the range after each press (to undefined until its end is chosen), or null for none. |
| minNights? | number | The fewest nights a range spans (its end this many days after its start); a shorter one starts over. |
| maxNights? | number | The most nights a range spans; a longer one starts over at the pressed date. |
| allowDisabledInRange? | boolean | Let a range cross days that cannot be chosen (its ends still can't be one); off by default. |
- Takes every prop of DatePickerPanel (its page: date-picker.md)
- State: value (value / defaultValue / onValueChange); drawn by data-focus-visible, data-disabled
- Types: DatePickerRange = { from: Date | undefined; to?: Date | undefined }
- data-slot values (to select a part by): calendar, calendar-set
Keyboard
| Key | What it does |
|---|---|
| Tab Shift+Tab | Move from the previous and next arrows to the month's one tab stop (the chosen day, else today) |
| ArrowLeft ArrowRight | The day before or after (mirrored right to left) |
| ArrowUp ArrowDown | The same day a week before or after |
| Home End | The week's first or last day |
| PageUp PageDown | The same day a month before or after, paging the month; with Shift a year |
| Enter Space | Choose the focused day (a range: its start, then its end) |
Accessibility
- The part itself answers the keys above.
Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:
| State | Drawn by |
|---|---|
| focus-visible | the attribute data-focus-visible |
| disabled | the attribute data-disabled |
Notes for AI
Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.