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

Month and year list

Pro

A month list or a year list in a month's caption, for a far date such as a date of birth, for React and Tailwind CSS. Part of Goop Pro.

Open the picker and choose a day, a range, any time, a repeat (weekdays or a day of the month) or a quick “soon” choice, or type one (“17 nov”, “1 dec - 5 dec”) and press Enter. The button says it in words; the line under it says what a form would keep. Nothing is saved; the line only shows what the choice holds.

When to use

  • A month list or a year list in a month's caption, for a far date such as a date of birth.

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 Month and year list 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-choices.json --yes
PROMPT
Add the Goop Month and year list to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { datePickerRepeatWords, datePickerSoonRange, parseDatePickerDay, parseDatePickerRange, DatePickerAnyPanel, DatePickerRecurringPanel } from '@/components/ui/goop/date-picker-choices';

import { useState } from 'react';
import { Calendar } from '@/components/ui/goop/calendar';
import {
  DatePickerCaptionList,
  type DatePickerChoice,
  DatePickerSoonPanel,
  datePickerChoiceWords,
} from '@/components/ui/goop/date-picker-choices';

function BirthAndDue() {
  const [due, setDue] = useState<DatePickerChoice>();
  return (
    <div className="flex flex-col gap-4">
      <Calendar
        aria-label="Date of birth"
        captionList={DatePickerCaptionList}
        minDate={new Date(1920, 0, 1)}
        maxDate={new Date()}
      />
      <DatePickerSoonPanel
        value={due?.mode === 'soon' ? due.key : null}
        onValueChange={(_key, choice) => setDue(choice)}
      />
      <p className="text-sm text-muted-foreground">{datePickerChoiceWords(due) || 'No due date'}</p>
    </div>
  );
}
  • Fits: flow, settings: field.
  • width, padding, gap, background, text: add no class for these.

API reference

Options
OptionTypeWhat it does
Defaultsoptions = []
  • Types: DatePickerRepeat = { every: 'day' } | { every: 'week'; weekdays: number[] } | { every: 'month'; day: number }; DatePickerSoonKey = 'today' | 'tomorrow' | 'this-week' | 'next-week' | 'this-month'
Parts
PartWhat it is
DatePickerAnyPanelThe panel for leaving the date open, one line of words; children replace the default sentence
DatePickerRecurringPanelThe panel for a repeating date, daily, weekly or monthly; value and onValueChange hold the repeat; value?: DatePickerRepeat — The repeat shown, held by the page with onValueChange; defaultValue?: DatePickerRepeat — The repeat shown first when the panel holds its own; onValueChange?: (value: DatePickerRepeat) => void — Called with the repeat as each control leaves it
DatePickerSoonPanelThe panel of quick choices, Today to This month; value is the chosen key, onValueChange hears a pick; value?: 'today' | 'tomorrow' | 'this-week' | 'next-week' | 'this-month' | null — The chosen quick choice, null for none, held by the page with onValueChange; defaultValue?: 'today' | 'tomorrow' | 'this-week' | 'next-week' | 'this-month' — The quick choice chosen first when the panel holds its own; onValueChange?: (value: 'today' | 'tomorrow' | 'this-week' | 'next-week' | 'this-month', choice: Extract<DatePickerChoice, { mode: 'soon' }>) => void — Called with the quick choice pressed (or chosen with Enter), and the choice with its days counted from today; today?: Date — The date the choices count from; the clock's if left out
datePickerRepeatWordsA repeat in words
datePickerSoonRangeThe days a quick choice stands for, counted from today
datePickerChoiceWordsA choice in words, as the layer's field shows it
parseDatePickerDayA day typed in the field, read leniently
parseDatePickerRangeA range typed in the field

Keyboard

KeyWhat it does
ArrowLeft ArrowRightMove between the five tabs, each opening its panel
TabMove from the tabs into the panel: the repeat's list, each weekday toggle, the day's list, or the quick choices' list; on the Day tab the caption's month and year lists, then the month
Space / Enter on a weekdayPress or release that day of a weekly repeat
ArrowUp / ArrowDown in the quick choicesMove between the quick choices; Enter chooses the one reached
EscapeClose the layer; the focus returns to what opened it

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:

StateDrawn by
pressedthe attribute aria-pressed

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-choices.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-date-picker-choices.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.