{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "date-picker",
  "type": "registry:ui",
  "title": "Date picker",
  "description": "A date field that opens a calendar in a popover: a single date, or a range with presets and two months side by side. With min and max dates, disabled days, a clear button and hidden inputs for forms.",
  "author": "DressCode UI <https://dresscodeui.com>",
  "dependencies": [
    "date-fns@^4.4.0",
    "lucide-react@^1.73.0",
    "react-day-picker@^10.0.2"
  ],
  "registryDependencies": [
    "button",
    "calendar",
    "popover"
  ],
  "files": [
    {
      "path": "registry/dresscode/components/date-picker/ui/date-picker.tsx",
      "type": "registry:ui",
      "content": "\"use client\"\n\n// Date picker: a field-sized button that opens a calendar in a popover.\n// DatePicker picks one day. DateRangePicker picks a range: two months side by side on wide screens and\n// one on phones, an optional list of presets, and an Apply step so a half-picked range never leaks out.\n// Both take min/max and disabled days, show a clear button once there is a value (Backspace or Delete\n// on the trigger clears too), and write ISO dates to a hidden input when given a `name`.\n// Pass `aria-labelledby` with your label's id: the picked date is appended to the accessible name.\n// DatePickerCalendar is the calendar inside them, for inline use: roomier cells, arrow keys that move\n// focus, and a grid that is not rebuilt each time the parent renders.\n// Built on the shadcn/ui Calendar (react-day-picker) and Popover; reads only the theme's variables.\nimport * as React from \"react\"\nimport { differenceInCalendarDays, differenceInCalendarMonths, endOfMonth, format, isSameDay, startOfDay, startOfMonth, startOfYear, subDays, subMonths } from \"date-fns\"\nimport { CalendarIcon, CheckIcon, XIcon } from \"lucide-react\"\nimport { getDefaultClassNames, type DateRange, type DayButtonProps, type Matcher, type PropsBase, type RootProps } from \"react-day-picker\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Calendar, CalendarDayButton } from \"@/components/ui/calendar\"\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/ui/popover\"\n\n/** Calendar options you can pass through; selection, month and disabled days are the picker's own. */\ntype CalendarOptions = Omit<PropsBase, \"mode\" | \"required\" | \"disabled\" | \"month\" | \"onMonthChange\" | \"numberOfMonths\">\n\n// ---------------------------------------------------------------------------------------------\n// Clock and helpers\n\nconst subscribeToMinutes = (onTick: () => void) => {\n  const timer = window.setInterval(onTick, 60_000)\n  return () => window.clearInterval(timer)\n}\n\n/**\n * Today at midnight, or undefined on the server and during hydration. Read \"today\" through this hook\n * when it shows up in what you render, so a page prerendered on another day (or in another time zone)\n * hydrates without a mismatch. It rolls over at midnight.\n */\nfunction useToday() {\n  const time = React.useSyncExternalStore(subscribeToMinutes, () => startOfDay(new Date()).getTime(), () => 0)\n  return React.useMemo(() => (time ? new Date(time) : undefined), [time])\n}\n\nfunction useMediaQuery(query: string) {\n  const subscribe = React.useCallback(\n    (onChange: () => void) => {\n      const list = window.matchMedia(query)\n      list.addEventListener(\"change\", onChange)\n      return () => list.removeEventListener(\"change\", onChange)\n    },\n    [query],\n  )\n  return React.useSyncExternalStore(subscribe, () => window.matchMedia(query).matches, () => false)\n}\n\n/** Controlled when the `value` prop is passed at all (even as undefined), uncontrolled otherwise. */\nfunction useValue<T>(props: object, value: T | undefined, defaultValue: T | undefined, onChange?: (next: T | undefined) => void) {\n  const controlled = \"value\" in props\n  const [own, setOwn] = React.useState(defaultValue)\n  const set = (next: T | undefined) => {\n    if (!controlled) setOwn(next)\n    onChange?.(next)\n  }\n  return [controlled ? value : own, set] as const\n}\n\nfunction toMatchers(min?: Date, max?: Date, disabledDays?: Matcher | Matcher[]): Matcher[] {\n  const extra = disabledDays === undefined ? [] : Array.isArray(disabledDays) ? disabledDays : [disabledDays]\n  return [...(min ? [{ before: startOfDay(min) }] : []), ...(max ? [{ after: startOfDay(max) }] : []), ...extra]\n}\n\nconst rdp = getDefaultClassNames()\n/** Month and year dropdowns that look like small select fields (the native select stays on top, invisible). */\nconst DROPDOWN_CLASSNAMES = {\n  dropdown_root: cn(\n    \"relative rounded-md border border-input shadow-xs has-focus-visible:border-ring has-focus-visible:ring-3 has-focus-visible:ring-ring/50\",\n    rdp.dropdown_root,\n  ),\n  dropdown: cn(\"absolute inset-0 cursor-pointer bg-popover opacity-0\", rdp.dropdown),\n  caption_label: cn(\n    \"flex h-7 items-center gap-1 rounded-md pr-1.5 pl-2 text-sm font-medium select-none [&>svg]:size-3.5 [&>svg]:text-muted-foreground\",\n    rdp.caption_label,\n  ),\n}\n\n// ---------------------------------------------------------------------------------------------\n// DatePickerCalendar\n\n// Stable parts for the stock Calendar. It defines its Root and DayButton inline, so every render of\n// the Calendar is a new component type and React rebuilds the grid (dropping keyboard focus); and its\n// day button never moves DOM focus when the arrow keys move the focused day.\nfunction CalendarRoot({ className, rootRef, ...props }: RootProps) {\n  return <div data-slot=\"calendar\" ref={rootRef} className={className} {...props} />\n}\n\nfunction CalendarFocusDayButton(props: DayButtonProps) {\n  const ref = React.useRef<HTMLSpanElement>(null)\n  const focused = props.modifiers.focused\n  React.useEffect(() => {\n    if (focused) ref.current?.querySelector(\"button\")?.focus()\n  }, [focused])\n  return (\n    <span ref={ref} className=\"contents\">\n      <CalendarDayButton {...props} />\n    </span>\n  )\n}\n\n/** The pickers' calendar, for inline use too. Takes every Calendar (react-day-picker) prop. */\nfunction DatePickerCalendar({ className, components, formatters, ...props }: React.ComponentProps<typeof Calendar>) {\n  return (\n    <Calendar\n      // Roomier day cells than the stock calendar, and finger-sized on phones.\n      className={cn(\"p-3 [--cell-size:--spacing(9)] sm:[--cell-size:--spacing(8)]\", className)}\n      components={{ Root: CalendarRoot, DayButton: CalendarFocusDayButton, ...components }}\n      // Month names in the calendar's own locale (the stock dropdown uses the browser's).\n      formatters={{ formatMonthDropdown: (month, dateLib) => (dateLib ? dateLib.format(month, \"LLL\") : format(month, \"LLL\")), ...formatters }}\n      {...props}\n    />\n  )\n}\n\n/** \"Nov 3, 2026\", \"Oct 26 – Nov 24, 2026\" or \"Dec 15, 2025 – Jan 14, 2026\". */\nfunction formatDateRange(range: DateRange | undefined, placeholder = \"\") {\n  if (!range?.from) return placeholder\n  const { from, to } = range\n  if (!to || isSameDay(from, to)) return format(from, \"MMM d, yyyy\")\n  if (from.getFullYear() === to.getFullYear()) return `${format(from, \"MMM d\")} – ${format(to, \"MMM d, yyyy\")}`\n  return `${format(from, \"MMM d, yyyy\")} – ${format(to, \"MMM d, yyyy\")}`\n}\n\nconst sameRange = (a?: DateRange, b?: DateRange) =>\n  !!a?.from && !!b?.from && !!a.to && !!b.to && isSameDay(a.from, b.from) && isSameDay(a.to, b.to)\n\nfunction clampRange(range: DateRange, min?: Date, max?: Date): DateRange | undefined {\n  let { from, to } = range\n  if (from && min && from < startOfDay(min)) from = startOfDay(min)\n  if (to && max && to > startOfDay(max)) to = startOfDay(max)\n  if (!from || (to && from > to)) return undefined\n  return { from, to }\n}\n\n// ---------------------------------------------------------------------------------------------\n// The field: trigger button, clear button and hidden input\n\ntype PickerBaseProps = {\n  id?: string\n  /** Writes the value to a hidden input: yyyy-MM-dd, or yyyy-MM-dd/yyyy-MM-dd for a range. */\n  name?: string\n  placeholder?: string\n  disabled?: boolean\n  /** Show a button that clears the value. Default true. */\n  clearable?: boolean\n  clearLabel?: string\n  /** The earliest day that can be picked; also where month navigation stops. */\n  min?: Date\n  /** The latest day that can be picked; also where month navigation stops. */\n  max?: Date\n  /** More days that cannot be picked: dates, ranges, { dayOfWeek: [0, 6] }, a function... */\n  disabledDays?: Matcher | Matcher[]\n  align?: \"start\" | \"center\" | \"end\"\n  open?: boolean\n  onOpenChange?: (open: boolean) => void\n  /** The field wrapper. */\n  className?: string\n  triggerClassName?: string\n  calendarProps?: CalendarOptions\n  \"aria-invalid\"?: boolean\n  \"aria-describedby\"?: string\n  \"aria-labelledby\"?: string\n  \"aria-label\"?: string\n}\n\ntype PickerFieldProps = Pick<\n  PickerBaseProps,\n  \"id\" | \"name\" | \"disabled\" | \"clearLabel\" | \"className\" | \"triggerClassName\" | \"aria-invalid\" | \"aria-describedby\" | \"aria-labelledby\" | \"aria-label\"\n> & {\n  slot: string\n  hasValue: boolean\n  showClear: boolean\n  hiddenValue: string\n  onClear: () => void\n  triggerRef: React.RefObject<HTMLButtonElement | null>\n  children: React.ReactNode\n}\n\nfunction PickerField({ slot, hasValue, showClear, hiddenValue, onClear, triggerRef, clearLabel, className, triggerClassName, children, ...props }: PickerFieldProps) {\n  const valueId = React.useId()\n  const clear = () => {\n    onClear()\n    triggerRef.current?.focus()\n  }\n  return (\n    <div data-slot={slot} className={cn(\"relative w-full\", className)}>\n      <PopoverTrigger\n        ref={triggerRef}\n        id={props.id}\n        disabled={props.disabled}\n        aria-invalid={props[\"aria-invalid\"] || undefined}\n        aria-describedby={props[\"aria-describedby\"]}\n        aria-label={props[\"aria-label\"]}\n        aria-labelledby={props[\"aria-labelledby\"] ? `${props[\"aria-labelledby\"]} ${valueId}` : undefined}\n        onKeyDown={(e) => {\n          if (showClear && (e.key === \"Backspace\" || e.key === \"Delete\")) {\n            e.preventDefault()\n            onClear()\n          }\n        }}\n        render={\n          <Button\n            variant=\"outline\"\n            data-slot={`${slot}-trigger`}\n            className={cn(\n              // Looks like the other fields (border-input, no fill); the open state keeps the button's muted fill.\n              \"w-full justify-start gap-2 border-input bg-transparent px-2.5 text-left font-normal hover:bg-transparent\",\n              showClear && \"pr-9\",\n              !hasValue && \"text-muted-foreground hover:text-muted-foreground aria-expanded:text-muted-foreground\",\n              triggerClassName,\n            )}\n          />\n        }\n      >\n        <CalendarIcon aria-hidden=\"true\" className=\"text-muted-foreground\" />\n        <span id={valueId} className=\"min-w-0 flex-1 truncate\">\n          {children}\n        </span>\n      </PopoverTrigger>\n      {showClear ? (\n        <Button\n          type=\"button\"\n          variant=\"ghost\"\n          size=\"icon-xs\"\n          data-slot={`${slot}-clear`}\n          aria-label={clearLabel}\n          onClick={clear}\n          className=\"absolute inset-y-0 right-1 my-auto text-muted-foreground hover:text-foreground\"\n        >\n          <XIcon />\n        </Button>\n      ) : null}\n      {props.name ? <input type=\"hidden\" name={props.name} value={hiddenValue} /> : null}\n    </div>\n  )\n}\n\n/** On keyboard open, focus the picked day (or today) so the arrow keys move through the grid at once. */\nfunction useDayFocus() {\n  const bodyRef = React.useRef<HTMLDivElement>(null)\n  const initialFocus = (openType: string) =>\n    openType === \"keyboard\" ? (bodyRef.current?.querySelector<HTMLElement>('[role=\"grid\"] button[tabindex=\"0\"]') ?? true) : true\n  return { bodyRef, initialFocus }\n}\n\n// ---------------------------------------------------------------------------------------------\n// DatePicker\n\ntype DatePickerProps = PickerBaseProps & {\n  value?: Date | undefined\n  defaultValue?: Date\n  onValueChange?: (date: Date | undefined) => void\n  /** date-fns format for the button text. Default \"MMM d, yyyy\" (Nov 24, 2026). */\n  displayFormat?: string\n  /** \"dropdown\" puts month and year selects in the caption, for birth dates and far-off dates. */\n  captionLayout?: PropsBase[\"captionLayout\"]\n  /** Close the popover once a day is picked. Default true. */\n  closeOnSelect?: boolean\n  /** Rendered in the popover under the calendar. */\n  footer?: React.ReactNode\n}\n\nfunction DatePicker(props: DatePickerProps) {\n  const {\n    defaultValue,\n    onValueChange,\n    placeholder = \"Pick a date\",\n    displayFormat = \"MMM d, yyyy\",\n    min,\n    max,\n    disabledDays,\n    captionLayout = \"label\",\n    closeOnSelect = true,\n    footer,\n    clearable = true,\n    clearLabel = \"Clear date\",\n    disabled,\n    align = \"start\",\n    open: openProp,\n    onOpenChange,\n    calendarProps,\n    ...field\n  } = props\n  const [value, setValue] = useValue(props, props.value, defaultValue, onValueChange)\n  const [ownOpen, setOwnOpen] = React.useState(false)\n  const open = openProp ?? ownOpen\n  const setOpen = (next: boolean) => {\n    setOwnOpen(next)\n    onOpenChange?.(next)\n  }\n  const triggerRef = React.useRef<HTMLButtonElement>(null)\n  const { bodyRef, initialFocus } = useDayFocus()\n  const dropdowns = captionLayout !== \"label\"\n\n  return (\n    <Popover open={open} onOpenChange={setOpen}>\n      <PickerField\n        {...field}\n        slot=\"date-picker\"\n        disabled={disabled}\n        clearLabel={clearLabel}\n        hasValue={!!value}\n        showClear={clearable && !!value && !disabled}\n        hiddenValue={value ? format(value, \"yyyy-MM-dd\") : \"\"}\n        onClear={() => setValue(undefined)}\n        triggerRef={triggerRef}\n      >\n        {value ? format(value, displayFormat) : placeholder}\n      </PickerField>\n      <PopoverContent align={align} initialFocus={initialFocus} className=\"max-h-(--available-height) w-auto gap-0 overflow-y-auto p-0\">\n        <div ref={bodyRef} data-slot=\"date-picker-content\">\n          <DatePickerCalendar\n            {...calendarProps}\n            mode=\"single\"\n            required\n            selected={value}\n            onSelect={(day) => {\n              setValue(day)\n              if (closeOnSelect) setOpen(false)\n            }}\n            defaultMonth={value ?? calendarProps?.defaultMonth}\n            startMonth={calendarProps?.startMonth ?? min}\n            endMonth={calendarProps?.endMonth ?? max}\n            disabled={toMatchers(min, max, disabledDays)}\n            captionLayout={captionLayout}\n            classNames={dropdowns ? { ...DROPDOWN_CLASSNAMES, ...calendarProps?.classNames } : calendarProps?.classNames}\n          />\n          {footer ? (\n            <div data-slot=\"date-picker-footer\" className=\"border-t p-3\">\n              {footer}\n            </div>\n          ) : null}\n        </div>\n      </PopoverContent>\n    </Popover>\n  )\n}\n\n// ---------------------------------------------------------------------------------------------\n// DateRangePicker\n\ntype DateRangePreset = {\n  label: string\n  /** The preset's range, given today at midnight. */\n  getRange: (today: Date) => DateRange\n}\n\n/** Report-style presets. \"This month\" and \"This year\" run up to today. */\nconst dateRangePresets: DateRangePreset[] = [\n  { label: \"Today\", getRange: (today) => ({ from: today, to: today }) },\n  { label: \"Last 7 days\", getRange: (today) => ({ from: subDays(today, 6), to: today }) },\n  { label: \"Last 30 days\", getRange: (today) => ({ from: subDays(today, 29), to: today }) },\n  { label: \"This month\", getRange: (today) => ({ from: startOfMonth(today), to: today }) },\n  {\n    label: \"Last month\",\n    getRange: (today) => {\n      const month = subMonths(today, 1)\n      return { from: startOfMonth(month), to: startOfDay(endOfMonth(month)) }\n    },\n  },\n  { label: \"This year\", getRange: (today) => ({ from: startOfYear(today), to: today }) },\n]\n\ntype DateRangePickerProps = PickerBaseProps & {\n  value?: DateRange | undefined\n  defaultValue?: DateRange\n  onValueChange?: (range: DateRange | undefined) => void\n  /** Shortcuts beside the calendar (above it on phones). See `dateRangePresets`. */\n  presets?: DateRangePreset[]\n  /** Default: 2 on screens 768px and wider, 1 below. */\n  numberOfMonths?: number\n  /** Keep the change as a draft until Apply (default). false: commit as soon as both ends are picked. */\n  confirm?: boolean\n  /** The shortest and longest range, in days. */\n  minDays?: number\n  maxDays?: number\n  /** Start over when a range would include a disabled day. */\n  excludeDisabled?: boolean\n  applyLabel?: string\n}\n\nfunction DateRangePicker(props: DateRangePickerProps) {\n  const {\n    defaultValue,\n    onValueChange,\n    placeholder = \"Pick a date range\",\n    presets,\n    numberOfMonths,\n    confirm = true,\n    minDays,\n    maxDays,\n    excludeDisabled,\n    applyLabel = \"Apply\",\n    min,\n    max,\n    disabledDays,\n    clearable = true,\n    clearLabel = \"Clear dates\",\n    disabled,\n    align = \"start\",\n    open: openProp,\n    onOpenChange,\n    calendarProps,\n    ...field\n  } = props\n  const [value, setValue] = useValue(props, props.value, defaultValue, onValueChange)\n  const today = useToday()\n  const wide = useMediaQuery(\"(min-width: 768px)\")\n  const months = numberOfMonths ?? (wide ? 2 : 1)\n  const [ownOpen, setOwnOpen] = React.useState(false)\n  const open = openProp ?? ownOpen\n  const [draft, setDraft] = React.useState<DateRange | undefined>(value)\n  const [month, setMonth] = React.useState<Date>()\n  const triggerRef = React.useRef<HTMLButtonElement>(null)\n  const { bodyRef, initialFocus } = useDayFocus()\n\n  const presetRange = (preset: DateRangePreset) => (today ? clampRange(preset.getRange(today), min, max) : undefined)\n  const activePreset = value ? presets?.find((p) => sameRange(presetRange(p), value)) : undefined\n  // The first month to show: where the range starts if it fits, else so it ends on the last month shown;\n  // then kept inside the navigable months (a report ending today shows last month and this one).\n  const monthFor = (range: DateRange | undefined) => {\n    const end = range?.to ?? range?.from ?? today ?? new Date()\n    const start = range?.from ?? end\n    let first = startOfMonth(differenceInCalendarMonths(end, start) < months ? start : subMonths(end, months - 1))\n    const lastMonth = calendarProps?.endMonth ?? max\n    const firstMonth = calendarProps?.startMonth ?? min\n    if (lastMonth && differenceInCalendarMonths(lastMonth, first) < months - 1) first = startOfMonth(subMonths(lastMonth, months - 1))\n    if (firstMonth && first < startOfMonth(firstMonth)) first = startOfMonth(firstMonth)\n    return first\n  }\n\n  const setOpen = (next: boolean) => {\n    if (next) {\n      setDraft(value)\n      setMonth(monthFor(value))\n    }\n    setOwnOpen(next)\n    onOpenChange?.(next)\n  }\n  const commit = (range: DateRange | undefined) => {\n    setValue(range?.from ? { from: range.from, to: range.to ?? range.from } : undefined)\n    setOpen(false)\n  }\n  const pickPreset = (range: DateRange) => {\n    if (!confirm) return commit(range)\n    setDraft(range)\n    setMonth(monthFor(range))\n  }\n\n  const days = draft?.from && draft.to ? differenceInCalendarDays(draft.to, draft.from) + 1 : 0\n\n  return (\n    <Popover open={open} onOpenChange={setOpen}>\n      <PickerField\n        {...field}\n        slot=\"date-range-picker\"\n        disabled={disabled}\n        clearLabel={clearLabel}\n        hasValue={!!value?.from}\n        showClear={clearable && !!value?.from && !disabled}\n        hiddenValue={value?.from ? `${format(value.from, \"yyyy-MM-dd\")}/${format(value.to ?? value.from, \"yyyy-MM-dd\")}` : \"\"}\n        onClear={() => setValue(undefined)}\n        triggerRef={triggerRef}\n      >\n        {activePreset ? <span className=\"hidden text-muted-foreground sm:inline\">{activePreset.label} · </span> : null}\n        {formatDateRange(value, placeholder)}\n      </PickerField>\n      <PopoverContent\n        align={align}\n        initialFocus={initialFocus}\n        className=\"max-h-(--available-height) w-auto max-w-[calc(100vw-1rem)] gap-0 overflow-y-auto p-0\"\n      >\n        <div ref={bodyRef} data-slot=\"date-range-picker-content\" className=\"flex flex-col sm:flex-row\">\n          {presets?.length ? (\n            <div\n              role=\"group\"\n              aria-label=\"Presets\"\n              data-slot=\"date-range-picker-presets\"\n              className=\"grid grid-cols-2 gap-1 border-b p-2 sm:flex sm:w-36 sm:shrink-0 sm:flex-col sm:border-r sm:border-b-0\"\n            >\n              {presets.map((preset) => {\n                const range = presetRange(preset)\n                const active = sameRange(range, draft)\n                return (\n                  <Button\n                    key={preset.label}\n                    type=\"button\"\n                    variant=\"ghost\"\n                    size=\"sm\"\n                    aria-pressed={active}\n                    disabled={!range}\n                    onClick={() => range && pickPreset(range)}\n                    className=\"justify-between font-normal aria-pressed:bg-muted aria-pressed:font-medium aria-pressed:text-foreground\"\n                  >\n                    {preset.label}\n                    {active ? <CheckIcon aria-hidden=\"true\" /> : null}\n                  </Button>\n                )\n              })}\n            </div>\n          ) : null}\n          <DatePickerCalendar\n            {...calendarProps}\n            mode=\"range\"\n            resetOnSelect\n            selected={draft}\n            onSelect={(range) => {\n              setDraft(range)\n              if (!confirm && range?.from && range.to) commit(range)\n            }}\n            month={month}\n            onMonthChange={setMonth}\n            numberOfMonths={months}\n            min={minDays}\n            max={maxDays}\n            excludeDisabled={excludeDisabled}\n            startMonth={calendarProps?.startMonth ?? min}\n            endMonth={calendarProps?.endMonth ?? max}\n            disabled={toMatchers(min, max, disabledDays)}\n            className={cn(\"max-sm:mx-auto\", calendarProps?.className)}\n          />\n        </div>\n        {confirm ? (\n          <div data-slot=\"date-range-picker-footer\" className=\"flex flex-wrap items-center justify-between gap-x-4 gap-y-2 border-t p-3\">\n            <p aria-live=\"polite\" className=\"text-sm\">\n              {!draft?.from ? (\n                <span className=\"text-muted-foreground\">Pick a start date</span>\n              ) : !draft.to ? (\n                <>\n                  <span className=\"font-medium\">{format(draft.from, \"MMM d, yyyy\")}</span>\n                  <span className=\"text-muted-foreground\"> – pick an end date</span>\n                </>\n              ) : (\n                <>\n                  <span className=\"font-medium\">{formatDateRange(draft)}</span>\n                  <span className=\"text-muted-foreground\">\n                    {\" \"}\n                    · {days} {days === 1 ? \"day\" : \"days\"}\n                  </span>\n                </>\n              )}\n            </p>\n            <div className=\"ml-auto flex gap-2\">\n              <Button type=\"button\" variant=\"ghost\" size=\"sm\" onClick={() => setOpen(false)}>\n                Cancel\n              </Button>\n              <Button type=\"button\" size=\"sm\" disabled={!draft?.from} onClick={() => commit(draft)}>\n                {applyLabel}\n              </Button>\n            </div>\n          </div>\n        ) : null}\n      </PopoverContent>\n    </Popover>\n  )\n}\n\nexport { DatePicker, DatePickerCalendar, DateRangePicker, dateRangePresets, formatDateRange, useToday }\nexport type { DatePickerProps, DateRange, DateRangePickerProps, DateRangePreset }\n"
    }
  ],
  "docs": "Date picker is in components/ui. Examples: https://dresscodeui.com/components/date-picker"
}
