import React from 'react'; import type { AriaCalendarProps, AriaRangeCalendarProps } from 'react-aria'; import type { DateValue } from '@internationalized/date'; import type { IsoDate } from './iso-date.js'; /** The single-date calendar, for `DatePicker`. */ export declare function SingleCalendar(props: AriaCalendarProps): React.JSX.Element; /** * The range calendar, for `DateRangePicker`. * * `useRangeCalendar` takes a ref and the single-date `useCalendar` does not, * which is not an inconsistency: the range calendar attaches a pointer-up * listener to it so that releasing the mouse OUTSIDE the calendar still ends * the drag. Without the ref the range would keep following the pointer after * the button came up somewhere else on the page. */ export declare function RangeCalendar({ visibleMonths, aside, footer, ...props }: AriaRangeCalendarProps & { visibleMonths?: number; aside?: React.ReactNode; footer?: React.ReactNode; }): React.JSX.Element; export interface CalendarProps { /** * Names the calendar. It has no field and no trigger, so this is the only * thing that says what the day is for — "Resume on", "Deliver on". */ label: React.ReactNode; /** Helper text under the month. */ description?: React.ReactNode; /** Replaces the helper text while invalid — `isInvalid`, or its own bounds. */ errorMessage?: React.ReactNode; isInvalid?: boolean; isDisabled?: boolean; /** Shows the day and lets it be read and moved through, not changed. */ isReadOnly?: boolean; /** The selected day as `YYYY-MM-DD`; `null` is none yet. */ value?: IsoDate | null; /** The initial day as `YYYY-MM-DD`, for an uncontrolled calendar. */ defaultValue?: IsoDate; /** * Fires with `YYYY-MM-DD`. Never with `null`: a day in a grid is changed * by picking another, not cleared. */ onChange?: (value: IsoDate) => void; /** Earliest selectable day, `YYYY-MM-DD`. Earlier months cannot be reached. */ minValue?: IsoDate; /** Latest selectable day, `YYYY-MM-DD`. */ maxValue?: IsoDate; /** Single days refused inside the bounds — weekends, holidays, booked days. */ isDateUnavailable?: (date: IsoDate) => boolean; /** * The month to open on, and the day focus lands on, while nothing is * selected. Defaults to today — or `minValue`, when today is before it. */ defaultFocusedValue?: IsoDate; /** Posts the value under this name, for an uncontrolled form. */ name?: string; id?: string; className?: string; } /** * Calendar — one month in the page, for a day chosen by looking at the month. * * DATEPICKER FIRST * * A date someone knows — a birthday, an invoice date — is typed faster than * it is found, and a field takes one row where this takes a month. This is * for a day that is chosen by where it falls: a day to resume on, a delivery * day, and for a place where a popover would be a second layer — a Modal, a * SidePanel. * * NAMED WITH THE MONTH * * `label` is the calendar's name, joined by react-aria to the visible month — * "Resume on October 2026" — so moving to another month says where you are. * Every day's name is its full date, in the reader's language; today and the * selected day are said as such. */ export declare function Calendar({ label, description, errorMessage, isInvalid, isDisabled, isReadOnly, value, defaultValue, onChange, minValue, maxValue, isDateUnavailable, defaultFocusedValue, name, id, className, }: CalendarProps): React.JSX.Element; export declare namespace Calendar { var displayName: string; } //# sourceMappingURL=Calendar.d.ts.map