Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-date-picker.json --yes

Date picker

Pro

A field that opens a month to choose one date, typed or picked, for React and Tailwind CSS. Part of Goop Pro.

Open the layer, pick a day in the month or type one ("tomorrow", "17 nov") and press Enter; clear it with the cross; Save shows the YYYY-MM-DD the form sends. The start-date chip beside it says its day in words (“Tomorrow”, “12 Nov”), opens on Enter, Space or Down, and its Soon tab sets the day at once. Under them, type a reminder day ("21 nov", "tomorrow") and press Enter: the page reads it and says it, and words it cannot read are refused. Paging the due date’s month is said under the form too. Nothing is saved: Save only reads the form, and the reminder is only written under it.

When to use

  • A field that opens a month to choose one date, typed or picked.
  • Also called: date input or calendar input.

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 Date picker 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.

Terminal
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-date-picker.json --yes
PROMPT
Add the Goop Date picker to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { DatePickerValue, DatePickerClear, DatePickerLabel, DatePickerSeparator } from '@/components/ui/goop/date-picker';

import {
  DatePicker,
  DatePickerContent,
  DatePickerHeader,
  DatePickerInput,
  DatePickerPanel,
  DatePickerTrigger,
} from '@/components/ui/goop/date-picker';

function VisitDate({ onPick }: { onPick: (day: Date | null) => void }) {
  return (
    <DatePicker name="visit" onValueChange={onPick}>
      <DatePickerTrigger placeholder="Visit date" />
      <DatePickerContent aria-label="Visit date">
        <DatePickerHeader>
          <DatePickerInput aria-label="Type a date" />
        </DatePickerHeader>
        <DatePickerPanel />
      </DatePickerContent>
    </DatePicker>
  );
}
  • height, width, padding, gap, corner, border, background, text, motion: add no class for these.

API reference

  • Each option with its sentence: date-picker--options.md
  • Takes every prop of Popover (its page: popover.md)
  • State: value (value / defaultValue / onValueChange); open (open / defaultOpen / onOpenChange); drawn by data-focus-visible, data-selected, data-outside-month, data-placeholder
Parts
PartWhat it is
DatePickerPanelThe date control's month; its props: date-picker--panel.md
DatePickerTriggerWhat opens and closes the layer; its props: date-picker--trigger.md
DatePickerValueThe chosen date's words, or the placeholder in grey while no date is chosen; its props: date-picker--value.md
DatePickerClearA quiet cross button beside the trigger that clears the chosen date, shown while one is chosen; its props: date-picker--clear.md
DatePickerContentThe layer (a dialog: name it with aria-label or aria-labelledby); also takes container?: HTMLElement | null; frameClassName?: string
DatePickerHeaderThe top of the open layer
DatePickerLabelThe field's words, a <label>; also takes htmlFor?: string
DatePickerInputThe layer's field for a typed date; its props: date-picker--input.md
DatePickerSeparatorThe hairline across the layer, between a caller's own parts and the month (the header draws its own)

DatePickerClear

A quiet cross button beside the trigger that clears the chosen date, shown while one is chosen.

TSX
import { DatePickerClear } from '@/components/ui/goop/date-picker';

Options

  • label?: string = 'Clear date' — The button's spoken name.
  • Also takes: type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean; tooltip?: string | false; tooltipKeys?: readonly string[]; loading?: boolean = false; loadingLabel?: string = 'Loading'

DatePickerInput

The layer's field for a typed date.

TSX
import { DatePickerInput } from '@/components/ui/goop/date-picker';

Options

  • placeholder?: string = 'Type a date' — The words shown while the field is empty.
  • locale?: string — The language the chosen date is written and a typed one read in (a BCP 47 tag; the page's language, else the browser's, if left out).
  • onValueCommit?: (words: string) => boolean | void — Called with the typed words on Enter or as the field is left; false refuses them (the field is marked invalid).
  • error?: ReactNode — The sentence shown under the field while what was typed is refused.
  • Also takes: value?: string; defaultValue?: string; onChange?: (event: ChangeEvent<HTMLInputElement>) => void; name?: string; required?: boolean; disabled?: boolean; form?: string

DatePicker: every option

TSX
import { DatePicker } from '@/components/ui/goop/date-picker';

Options

  • id?: string
  • aria-describedby?: string
  • aria-invalid?: boolean | 'true' | 'false'
  • disabled?: boolean
  • value?: Date | null — The chosen date, when the caller holds it (null for none); with onValueChange.
  • defaultValue?: Date — The date chosen at first, when the field holds it.
  • onValueChange?: (value: Date | null) => void — Called with the date chosen (in the month or typed), or null when it is cleared.
  • name?: string — The form field's name: a hidden field sends the chosen date as YYYY-MM-DD.
  • Also takes: open?: boolean; defaultOpen?: boolean = false; onOpenChange?: (open: boolean) => void; modal?: boolean
  • Takes every prop of Popover (its page: popover.md)
  • State: value (value / defaultValue / onValueChange); open (open / defaultOpen / onOpenChange); drawn by data-focus-visible, data-selected, data-outside-month, data-placeholder

DatePickerPanel

The date control's month.

TSX
import { DatePickerPanel } from '@/components/ui/goop/date-picker';

Options

  • month?: Date — The first month shown, when the caller holds it; with onMonthChange.
  • defaultMonth?: Date — The first month shown at first, when the panel holds it; the month of today if left out.
  • onMonthChange?: (month: Date) => void — Called with the first date of the month paged to, by a button or a key.
  • numberOfMonths?: number = 1 — How many months are shown side by side, wrapping; the paging buttons sit once, in the last month's caption.
  • disabledDays?: DatePickerMatcher | DatePickerMatcher[] — The days a person cannot choose.
  • disabled?: boolean — Whether the month is disabled: every day refused (the paging still pages).
  • captionList?: ComponentType<DropdownProps> — A month list and a year list in place of the month's title, for a far date such as a birth date: the date library's dropdown part (ComponentType<DropdownProps>).
  • minDate?: Date — The first date a person can choose: the dates before it cannot be chosen, and the month pages back no further.
  • maxDate?: Date — The last date a person can choose: the dates after it cannot be chosen, and the month pages on no further.
  • weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6 — The weekday a week starts on, 0 for Sunday to 6 for Saturday.
  • today?: Date — The date marked as today; the clock's if left out.
  • locale?: string — The language the month's title, the weekday letters and every spoken day name are written in, a BCP 47 tag (de, fr-CA); the page's language (<html lang>), else the browser's, if left out.
  • dateLocale?: Partial<DayPickerLocale>
  • autoFocus?: boolean — Move the focus to the grid's tab stop when the panel mounts.
  • previousLabel?: string = 'Previous month' — The previous-month button's name.
  • nextLabel?: string = 'Next month' — The next-month button's name.
  • 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 panel holds it. Or: The range chosen at first, when the panel 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 = false — Let a range cross days that cannot be chosen (its ends still can't be one); off by default.
  • Also takes: dir?: string
  • Types: DatePickerMatcher = Matcher; DatePickerRange = { from: Date | undefined; to?: Date | undefined }

DatePickerTrigger

What opens and closes the layer.

TSX
import { DatePickerTrigger } from '@/components/ui/goop/date-picker';

Options

  • shape?: 'chip' — chip: a record's quiet value, drawn by the trigger itself (no child): the chosen day's words ("Nov 25 2026"), and while none is chosen the property's label (else placeholder) in grey.
  • label?: string — The property, Due date: the start of the trigger's name ("Due date: Nov 25 2026"); a chip's words while empty.
  • icon?: IconName — The icon, by the pack's name; calendar by default (a chip draws it only folded, iconOnly).
  • placeholder?: string = 'Pick a date' — The drawn trigger's words while no day is chosen, in grey; Pick a date by default.
  • iconOnly?: boolean | 'narrow' = false — A chip as its icon alone, its words in a tooltip: true always; 'narrow' while its row, which must carry the class @container/chip-row, is under 641 px.
  • format?: (day: Date) => string — Writes the day in your own words; left out, "Nov 25 2026" in the page's language.
  • locale?: string — The language the default words are written in (a BCP 47 tag; the page's language, else the browser's, if left out).
  • today?: Date
  • noneLabel?: string = 'none' — The word the chip's name says while no day is chosen ("Due date: none"); none by default.
  • Also takes: asChild?: boolean

DatePickerValue

The chosen date's words, or the placeholder in grey while no date is chosen.

TSX
import { DatePickerValue } from '@/components/ui/goop/date-picker';

Options

  • placeholder?: string = 'Pick a date' — The words shown while no date is chosen.
  • format?: (day: Date) => string — Writes the chosen date; "Nov 25 2026" if left out.
  • locale?: string — The language the default words are written in.

Keyboard

KeyWhat it does
EnterOn the trigger: open, the focus in the field
SpaceOn the trigger: open, the focus in the field
Tab Shift+TabMove from the field to the arrows and the month's one tab stop
ArrowLeft ArrowRightIn the month: the day before or after (mirrored right to left)
ArrowUp ArrowDownIn the month: the same day a week before or after
Home EndIn the month: the week's first or last day
PageUp PageDownIn the month: the same day a month before or after; with Shift a year
Enter SpaceIn the month: choose the day, close the layer, the focus back on the trigger
EscapeClose, the focus back on the trigger (in a field holding typed words: put the day's words back first)

Accessibility

  • The native element answers the keyboard.
  • hover, active: the browser's own (:hover, :active): write nothing

Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:

StateDrawn by
focus-visiblethe attribute data-focus-visible
selectedthe attribute data-selected
outside-monththe attribute data-outside-month
disabledthe prop disabled
invalidthe attribute aria-invalid
placeholder-shownthe attribute data-placeholder

Motion

  • The part sets its own motion: add no transition or animation of your own.

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.

goop.so/themes/meadow/components/date-picker.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-date-picker.json --yes

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.