import type { ComponentProps } from '@fluentui/react-utilities'; import type { ComponentState } from '@fluentui/react-utilities'; import type { DistributiveOmit } from '@fluentui/react-utilities'; import type { EventData } from '@fluentui/react-utilities'; import type { EventHandler } from '@fluentui/react-utilities'; import type { ForwardRefComponent } from '@fluentui/react-utilities'; import type { JSXElement } from '@fluentui/react-utilities'; import type { PositioningProps as PositioningProps_2 } from '@fluentui/react-positioning'; import type { PositioningShorthandValue } from '@fluentui/react-positioning'; import * as React_2 from 'react'; import type { RefAttributes } from '@fluentui/react-utilities'; import type { Slot } from '@fluentui/react-utilities'; /** * Calendar shows a date grid and lets the user pick a date, a week, a work week or a month. */ declare const Calendar: ForwardRefComponent; /** * A date and its formatted display value. */ declare type CalendarDateLabelData = { /** * The actual date object. */ date: Date; /** * The formatted display value of the date. */ formattedDate: string; }; /** * Supported date and time display formats. */ declare type CalendarDateTimeFormat = 'day' | 'month' | 'shortMonth' | 'year' | 'monthDayYear' | 'monthYear' | 'weekday' | 'shortWeekday'; /** * CalendarDay shows a month header with navigation, above the grid of that month's days. */ declare const CalendarDay: ForwardRefComponent; /** * Semantic day data passed to cell getters, without DOM props. */ declare type CalendarDayCellData = Day & { /** * The formatted day number, or the civil date label when `originalDate` is `null`. */ label: string; /** * Whether this day is the grid's initial focus target. */ isNavigated: boolean; }; /** * Overrides for the existing elements of a visible day cell. These are prop bags, not slots. * Use label.children for day content or button.children to replace both the label and marker. */ declare type CalendarDayCellProps = { /** * Overrides for the ``. Its children remain controlled by the renderer. */ root?: Omit, 'children'>; /** * Overrides for the day button. Set `children` to replace both the label and marker. */ button?: React_2.ComponentProps<'button'>; /** * Overrides for the day-number span. Set `children` to customize content while preserving the marker. */ label?: React_2.ComponentProps<'span'>; /** * Overrides for the marker element. Applied only when the day is marked. */ marker?: React_2.ComponentProps<'span'>; }; /** * Data describing activation of the day picker's close button. */ declare type CalendarDayDismissData = EventData<'click' | 'keydown', React_2.SyntheticEvent>; /** * The imperative API exposed through CalendarDay's `imperativeRef` prop. */ declare type CalendarDayHandle = { /** * Moves focus to the day the grid is currently navigated to. */ focus(options?: FocusOptions): void; }; /** * Data describing activation of the day picker's month/year heading. */ declare type CalendarDayHeaderSelectData = EventData<'click' | 'keydown', React_2.SyntheticEvent>; /** * Data describing a request to navigate the day picker. */ declare type CalendarDayNavigateData = EventData<'click' | 'keydown', React_2.SyntheticEvent> & { /** * The date to navigate to. */ date: Date; /** * Whether focus should move into the day grid after navigation. */ focusOnNavigatedDay: boolean; }; /** * Props for the day picker. Shared selection, boundaries, and formatting come from CalendarProvider. */ declare type CalendarDayProps = ComponentProps> & Pick, 'daysToSelectInDayView'> & { /** * Provides access to the picker's focus handle. */ imperativeRef?: React_2.Ref; /** * The currently navigated date */ navigatedDate?: Date; /** * Called when navigation is requested. The event data includes the destination date and whether * focus should move into the day grid. */ onNavigateDate?: EventHandler; /** * Callback issued when calendar day is closed */ onDismiss?: EventHandler; /** * Callback function when the header is selected */ onHeaderSelect?: EventHandler; /** * How many weeks to show. If not provided, shows enough weeks to display the navigated month, * between 4 and 6 depending. * @default undefined */ weeksToShow?: number; /** * Optional callback function to mark specific days with a small symbol. Fires when the date range changes, * gives the starting and ending displayed dates and expects the list of which days in between should be * marked. */ getMarkedDays?: (startingDate: Date, endingDate: Date) => Date[]; /** * Overrides the existing elements of each visible cell, including placeholder dates. * Receives semantic day data and a formatted label, not DOM props. * Refs are composed, class names appended and styles merged. * Defined consumer props override defaults, including roles, focus, disabled/selection state and data attributes. * Consumers are responsible for preserving accessibility and interaction semantics when overriding these props. * Handlers run before the delegated grid behavior; preventDefault cancels selection and navigation. * Marker overrides apply only to marked days. * Called when the renderer resolves the cell's props, not while the hook builds its data. */ getCellProps?: (day: CalendarDayCellData) => CalendarDayCellProps; /** * Overrides each visible week row and the weekday header row. Use row.type to identify the row. * Week-number overrides apply only when week numbers are shown. * Called when the renderer resolves the row's props. */ getRowProps?: (row: CalendarDayRowData) => CalendarDayRowProps; /** * Overrides each weekday header cell, including its default role and scope. * Receives semantic weekday data and formatted labels. Called when the renderer resolves the cell's props. */ getWeekdayCellProps?: (weekday: CalendarDayWeekdayCellData) => CalendarDayWeekdayCellProps; }; /** * A visible week or weekday-header row, without DOM props on the row or its items. */ declare type CalendarDayRowData = { /** * Identifies a row of day cells. */ type: 'week'; /** * Zero-based index of the visible week row. */ key: number; /** * Semantic day data in display order, including placeholder dates. */ days: CalendarDayCellData[]; /** * The numeric week number, present only when week numbers are shown and the row has a representable date. */ weekNumber?: number; } | { /** * Identifies the weekday header row. */ type: 'weekday'; /** * Semantic header-cell data ordered from the configured first day of the week. */ cells: CalendarDayWeekdayCellData[]; }; /** Overrides for a week row or weekday-header row. */ declare type CalendarDayRowProps = { /** * Overrides for the ``. Its cells remain controlled by the renderer. */ root?: Omit, 'children'>; /** * Overrides for the week-number ``, or the header row's spacer. * Applied only when the corresponding element is rendered. */ weekNumber?: React_2.ComponentProps<'th'>; }; /** * Slots rendered by the day picker. */ declare type CalendarDaySlots = { /** * The outer container of the day picker. */ root: NonNullable>; /** * Holds the month/year title and the navigation buttons. */ header: NonNullable>; /** * The month and year label. Renders as a `button` when `onHeaderSelect` is set, otherwise as a * plain `div`. */ heading: NonNullable>; /** * Wraps the previous/next month and close buttons. */ navigation: NonNullable>; /** * The button to navigate to the previous month. */ previousMonthButton: NonNullable>; /** * The button to navigate to the next month. */ nextMonthButton: NonNullable>; /** * The close button. */ closeButton?: Slot<'button'>; /** * The `` holding the days of the navigated month, with a single roving tab stop. Arrows, Home * and End move focus between available days; Calendar owns selection, range hover and navigation beyond visible * dates. */ grid: NonNullable>; /** * The `` wrapping every week row. */ body: NonNullable>; }; /** * Semantic weekday data passed to header-cell getters. */ declare type CalendarDayWeekdayCellData = { /** * Stable key of the weekday header cell. */ key: string; /** * The weekday represented by the header cell. */ dayOfWeek: DayOfWeek; /** * The visible short weekday label, or a short month label at a month boundary in single-week view. */ label: string; /** * The full weekday or month label used as the cell's default accessible name and title. */ accessibleLabel: string; }; /** Overrides for a weekday header cell. */ declare type CalendarDayWeekdayCellProps = { /** * Overrides for the `
`, including its visible content and accessible name. */ root?: React_2.ComponentProps<'th'>; }; /** * Event data for dismissing the Calendar. */ declare type CalendarDismissData = EventData<'click' | 'keydown', React_2.SyntheticEvent>; /** * Formatters used for calendar display values and accessibility labels. */ declare type CalendarFormatters = { /** * Label for the button that navigates to today. */ goToTodayLabel: () => string; /** * Label for the button that closes the calendar. */ closeLabel: () => string; /** * Formats a date according to the specified format. */ dateTime: (data: { date: Date; format: CalendarDateTimeFormat; }) => string; /** * Formats the label for the previous month button. */ previousMonthLabel: (data: CalendarDateLabelData) => string; /** * Formats the label for the next month button. */ nextMonthLabel: (data: CalendarDateLabelData) => string; /** * Formats the label for the previous year button. */ previousYearLabel: (data: CalendarDateLabelData) => string; /** * Formats the label for the next year button. */ nextYearLabel: (data: CalendarDateLabelData) => string; /** * Formats the label for the previous year range button. */ previousYearRangeLabel: (data: CalendarYearRangeLabelData) => string; /** * Formats the label for the next year range button. */ nextYearRangeLabel: (data: CalendarYearRangeLabelData) => string; /** * Formats the label for the month picker header. */ monthPickerHeaderLabel: (data: CalendarDateLabelData) => string; /** * Formats the label for the day picker header. */ dayPickerHeaderLabel: (data: CalendarDateLabelData) => string; /** * Formats the label for the year range picker header. */ yearRangePickerHeaderLabel: (data: CalendarYearRangeLabelData) => string; /** * Formats the label for the week number column header. */ weekNumberLabel: (data: { weekNumber: number; }) => string; /** * Formats the label for the selected date. */ selectedDateLabel: (data: CalendarDateLabelData) => string; /** * Formats the label for today's date. */ todayDateLabel: (data: CalendarDateLabelData) => string; /** * Formats the label for a marked day. */ dayMarkedLabel: (data: CalendarDateLabelData) => string; }; /** * One row of the month or year grid. */ declare type CalendarGridRow = { /** Stable key of the row. */ key: number; /** Semantic cells in display order. */ cells: TCell[]; }; /** Controls how the day and month pickers are arranged. */ declare type CalendarLayout = 'sideBySide' | 'overlay'; /** * CalendarMonth shows the months of the navigated year, and opens the year picker from its header. */ declare const CalendarMonth: ForwardRefComponent; /** * Semantic month data stored in the grid and passed to cell getters, without DOM props. */ declare type CalendarMonthCellData = { /** * Index of the month within the year, matching `Date.prototype.getMonth()`. */ index: number; /** * The formatted short month name displayed in the cell. */ label: string; /** * Whether this month is the grid's initial focus target, falling back to an available month when needed. */ isNavigated: boolean; /** * Whether this month matches today's month and year, independently of consumer styling. */ isCurrent: boolean; /** * Whether this is the selected month. */ isSelected: boolean; /** * Whether this month can be selected. */ isInBounds: boolean; }; /** Overrides for a month gridcell and its nested button. */ declare type CalendarMonthCellProps = { /** * Overrides for the `
`. */ root?: Omit, 'children'>; /** * Overrides for the nested month button. Set `children` to customize the month content. */ button?: React_2.ComponentProps<'button'>; }; /** * The imperative API exposed through CalendarMonth's `imperativeRef` prop. */ declare type CalendarMonthHandle = { /** * Moves focus to the navigated month (or the first available month if it is disabled), * or to the year picker while it is open. */ focus(options?: FocusOptions): void; /** * Replaces the month grid with the year picker and moves focus into it. Does nothing when `yearPickerHidden` is set. */ showYearPicker(): void; }; /** * Data describing activation of the month picker's heading or a month selection that returns to the day view. */ declare type CalendarMonthHeaderSelectData = EventData<'click' | 'keydown', React_2.SyntheticEvent>; /** * Data describing a request to navigate the month picker. */ declare type CalendarMonthNavigateData = EventData<'click' | 'keydown', React_2.SyntheticEvent> & { /** * The date to navigate to. */ date: Date; /** * Whether focus should move into the day grid after navigation. */ focusOnNavigatedDay: boolean; }; /** * Props for the month picker. Shared selection, boundaries, and formatting come from CalendarProvider. */ declare type CalendarMonthProps = ComponentProps> & { /** * Provides access to the picker's focus handle. The regular `ref` points to the root element. */ imperativeRef?: React_2.Ref; /** * The currently navigated date */ navigatedDate?: Date; /** * The date whose month is selected and whose year is selected in the year picker. * Defaults to the Calendar's selected value, or today when that value is undefined. * Set to null for an empty selection. */ selectedDate?: Date | null; /** * Overrides each month gridcell and its nested button. Use button.children to customize its content. * Receives semantic month data and a formatted label, not DOM props. * Refs are composed, class names appended and styles merged. * Defined consumer props override defaults, including roles, focus, disabled/selection state and data attributes. * Consumers are responsible for preserving accessibility and interaction semantics when overriding these props. * Handlers run before the delegated grid behavior; preventDefault cancels selection. * Called when the renderer resolves the cell's props, not while the hook builds its data. */ getCellProps?: (month: CalendarMonthCellData) => CalendarMonthCellProps; /** * Overrides each row's default props, including its role and focus attributes, without replacing its cells. * Receives semantic row and month data. Called when the renderer resolves the row's props. */ getRowProps?: (row: CalendarMonthRowData) => CalendarMonthRowProps; /** * Called when a month is selected. The date is an available day in that month and the range * follows the CalendarProvider configuration. Year navigation does not select a month. */ onSelectDate?: EventHandler; /** * Called when month or year navigation is requested. The event data includes the destination date * and whether focus should move into the day grid. */ onNavigateDate?: EventHandler; /** * Called when the heading is activated while the year picker is hidden, or when a month is selected * to return to the day view. */ onHeaderSelect?: EventHandler; /** * Whether the year picker is hidden * @default false */ yearPickerHidden?: boolean; }; /** Semantic month row passed to getters, without DOM props on the row or its cells. */ declare type CalendarMonthRowData = CalendarGridRow; /** Overrides for a month row. */ declare type CalendarMonthRowProps = { /** * Overrides for the row's `
`. Its month cells remain controlled by the renderer. */ root?: React_2.ComponentProps<'div'>; }; /** * Data describing a month selection and its bounded, unrestricted date range. */ declare type CalendarMonthSelectData = EventData<'click' | 'keydown', React_2.SyntheticEvent> & { /** * An available day in the selected month, preserving the navigated day of the month when possible. */ date: Date; /** * The dates selected for the configured range, excluding restricted and out-of-bounds dates. */ selectedDateRange: Date[]; }; /** * Slots rendered by the month picker. */ declare type CalendarMonthSlots = { /** * The outer container of the month picker. */ root: NonNullable>; /** * Holds the year title and the navigation buttons. */ header: NonNullable>; /** * The year label, which opens the year picker when it is not hidden. */ heading: NonNullable>; /** * Wraps the previous and next year buttons. */ navigation: NonNullable>; /** * The button to navigate to the previous year. */ previousYearButton: NonNullable>; /** * The button to navigate to the next year. */ nextYearButton: NonNullable>; /** * The grid holding the month rows, with a roving tab stop and arrow, Home and End navigation. */ grid: NonNullable>; /** * The year picker, which replaces the whole month picker while it is open. Only rendered while * `isYearPickerVisible` is set. */ yearPicker: NonNullable>; }; /** Event data reported when the displayed date changes through user interaction. */ declare type CalendarNavigateData = EventData<'click' | 'keydown', React_2.SyntheticEvent> & { /** The date displayed by the calendar. */ displayedDate: Date; }; /** * Props for the Calendar component. */ declare type CalendarProps = DistributiveOmit>, 'defaultValue'> & { /** * Callback for when a date is selected * @param date - The date the user selected * @param selectedDateRange - The resultant list of dates that are selected based on the date range type set * for the component. */ onSelectDate?: EventHandler; /** * Callback for when calendar is closed */ onDismiss?: EventHandler; /** * The selected date. `null` represents an explicitly empty controlled selection. * A value outside `minDate`/`maxDate` renders as an empty selection and warns in development. */ value?: Date | null; /** The initial selected date when uncontrolled. `null` starts with no selection. */ defaultValue?: Date | null; /** The displayed date, controlled independently of value. When omitted, external value changes navigate automatically. */ displayedDate?: Date; /** The initial displayed date when uncontrolled. */ defaultDisplayedDate?: Date; /** Called once per user navigation or selection action. External prop changes do not fire this callback. */ onDisplayedDateChange?: EventHandler; /** The active picker in an overlay layout. */ view?: CalendarView; /** The initial active picker when uncontrolled. */ defaultView?: CalendarView; /** Called when user interaction changes the active picker. */ onViewChange?: EventHandler; /** * How the day and month pickers are arranged. Consumers control responsive layout changes. * @default 'sideBySide' */ layout?: CalendarLayout; /** * Value of today. If unspecified, the current time on the client machine is used. Pass this explicitly * while server rendering to keep the server and client calendars consistent. */ today?: Date; /** * The date range type indicating how many days should be selected as the user * selects days * @default 'day' */ dateRangeType?: DateRangeType; /** * The first day of the week for your locale. * @default 'sunday' */ firstDayOfWeek?: DayOfWeek; /** * Defines when the first week of the year should start. * @default 'firstDay' */ firstWeekOfYear?: FirstWeekOfYear; /** * Whether the calendar should show the week-of-year number before each week row. * @default false */ showWeekNumbers?: boolean; /** * Overrides date and accessibility label formatters. Omitted formatters use the defaults. */ formatters?: Partial; /** * If set the Calendar will not allow navigation to or selection of a date earlier than this value. */ minDate?: Date; /** * If set the Calendar will not allow navigation to or selection of a date later than this value. */ maxDate?: Date; /** * If set the Calendar will not allow selection of dates in this array. */ restrictedDates?: Date[]; /** * The days that are selectable when `dateRangeType` is `workWeek`. * If `dateRangeType` is not `workWeek` this property does nothing. * @default ['monday', 'tuesday', 'wednesday', 'thursday', 'friday'] */ workWeekDays?: DayOfWeek[]; /** * Allows all dates and buttons to be focused, including disabled ones * @default false */ allFocusable?: boolean; /** * Number of columns in the month picker. * @default 4 */ calendarMonthColumns?: 3 | 4; /** * Number of columns in the year picker. * @default 4 */ calendarYearColumns?: 3 | 4; }; /** * Event data for a date selection. */ declare type CalendarSelectDateData = EventData<'click' | 'keydown', React_2.SyntheticEvent> & { /** * The date selected by the user. */ date: Date; /** * Dates selected according to the configured range type. */ selectedDateRange: Date[]; }; /** * Slots available to the Calendar component. */ declare type CalendarSlots = { /** * Root container. */ root: NonNullable>; /** * Announces the selected date to assistive technology. */ liveRegion: NonNullable>; /** * The day picker. Set to `null` to select months without showing the day picker. */ dayPicker?: Slot; /** * Separates the day picker from the month picker when both are visible. */ divider: NonNullable>; /** * Wraps the month picker. */ monthPickerWrapper: NonNullable>; /** * The month picker. Set to `null` to show only the day picker. */ monthPicker?: Slot; /** * The "go to today" button, rendered as the root's last child. * Use CSS to position it below either picker or across the full width. Set to `null` to hide it. */ goToTodayButton?: Slot<'button'>; }; /** Picker views available when Calendar uses an overlay layout. */ declare type CalendarView = 'day' | 'month'; /** Event data reported when user interaction changes the active overlay view. */ declare type CalendarViewChangeData = EventData<'click' | 'keydown', React_2.SyntheticEvent> & { /** The active picker when the calendar uses an overlay layout. */ view: CalendarView; }; /** * CalendarYear shows a range of years and lets the user pick one. */ declare const CalendarYear: ForwardRefComponent; /** * Semantic year data stored in the grid and passed to cell getters, without DOM props. */ declare type CalendarYearCellData = { /** * The numeric year represented by the cell. */ year: number; /** * Formatted year label. */ label: string; /** * Whether this is the current year. */ isCurrent: boolean; /** * Whether this is the selected year. */ isSelected: boolean; /** * Whether this is the focus target in the displayed range. */ isNavigated: boolean; /** * Whether this year cannot be selected. */ isDisabled: boolean; }; /** Overrides for a year gridcell and its nested button. */ declare type CalendarYearCellProps = { /** * Overrides for the `
`. */ root?: Omit, 'children'>; /** * Overrides for the nested year button. Set `children` to customize the year content. */ button?: React_2.ComponentProps<'button'>; }; /** * The imperative API exposed through CalendarYear's `imperativeRef` prop. */ declare type CalendarYearHandle = { /** * Focuses the navigated year, or the selected/current year when navigation is unspecified, * within the focusable visible range. */ focus(options?: FocusOptions): void; }; /** * Data describing activation of the year-range heading. */ declare type CalendarYearHeaderSelectData = EventData<'click' | 'keydown', React_2.SyntheticEvent> & { /** * Whether focus should move to the parent picker when returning from the year view. */ focus: boolean; }; /** * Data describing navigation to another visible year range. */ declare type CalendarYearNavigateData = EventData<'click' | 'keydown', React_2.SyntheticEvent> & { /** * The first year of the destination range. */ year: number; }; /** * Props for the year picker. Shared selection, boundaries, and formatting come from CalendarProvider. */ declare type CalendarYearProps = ComponentProps> & { /** * Provides access to the picker's focus handle. The regular `ref` points to the root element. */ imperativeRef?: React_2.Ref; /** * The currently navigated year. Takes precedence over selectedYear for the displayed range and focus. */ navigatedYear?: number; /** * The highlighted year. Initializes the displayed range and focus only when navigatedYear is omitted. * Defaults to the year of the Calendar's selected value. Set to null for an empty selection. */ selectedYear?: number | null; /** * Overrides each year gridcell and its nested button. Use button.children to customize its content. * Receives semantic year data and a formatted label, not DOM props. * Refs are composed, class names appended and styles merged. * Defined consumer props override defaults, including roles, focus, disabled/selection state and data attributes. * Consumers are responsible for preserving accessibility and interaction semantics when overriding these props. * Handlers run before the delegated grid behavior; preventDefault cancels selection. * Called when the renderer resolves the cell's props, not while the hook builds its data. */ getCellProps?: (year: CalendarYearCellData) => CalendarYearCellProps; /** * Overrides each row's default props, including its role and focus attributes, without replacing its cells. * Receives semantic row and year data. Called when the renderer resolves the row's props. */ getRowProps?: (row: CalendarYearRowData) => CalendarYearRowProps; /** * Called when a year is selected. The event data includes the selected year. */ onSelectYear?: EventHandler; /** * Called when navigation changes the visible twelve-year range. * The event data includes the first year of the destination range. */ onNavigateDate?: EventHandler; /** * Called when the year-range heading is activated to return to the parent picker. */ onHeaderSelect?: EventHandler; }; /** * A year range and its formatted display value. */ declare type CalendarYearRangeLabelData = { /** * The starting year of the range. */ fromYear: number; /** * The ending year of the range. */ toYear: number; /** * The formatted display value of the year range. */ formattedRange: string; }; /** Semantic year row passed to getters, without DOM props on the row or its cells. */ declare type CalendarYearRowData = CalendarGridRow; /** Overrides for a year row. */ declare type CalendarYearRowProps = { /** * Overrides for the row's `
`. Its year cells remain controlled by the renderer. */ root?: Omit, 'children'>; }; /** * Data describing a year selection. */ declare type CalendarYearSelectData = EventData<'click' | 'keydown', React_2.SyntheticEvent> & { /** * The selected year. */ year: number; }; /** * Slots rendered by the year picker. */ declare type CalendarYearSlots = { /** * The outer container of the year picker. */ root: NonNullable>; /** * Holds the year range title and the navigation buttons. */ header: NonNullable>; /** * The year range label. Renders as a `button` when `onHeaderSelect` is set, otherwise as a * plain `div`. */ heading: NonNullable>; /** * Wraps the previous and next range buttons. */ navigation: NonNullable>; /** * The button to navigate to the previous year range. */ previousRangeButton: NonNullable>; /** * The button to navigate to the next year range. */ nextRangeButton: NonNullable>; /** * The grid holding the year rows, with a roving tab stop and arrow, Home and End navigation. */ grid: NonNullable>; }; /** * DatePicker lets someone choose one calendar date from a field that opens a non-modal Calendar dialog, and * optionally type a date they already know. * * The field needs an accessible name from a Field label, `aria-labelledby` or `aria-label`. */ export declare const DatePicker: DatePickerComponent; /** * Props shared by both DatePicker field controls. */ export declare type DatePickerBaseProps = { /** * Calendar configuration. Selection, boundaries and today are owned by DatePicker. */ calendar?: NonNullable>; /** * The committed date. `null` represents an explicitly empty controlled value. */ value?: Date | null; /** * The initially committed date when uncontrolled. */ defaultValue?: Date | null; /** * Called when a calendar selection, accepted typed date, or clearing the field changes the committed date. */ onDateChange?: EventHandler; /** * Called after typed text or a calendar selection is validated. */ onValidationResult?: EventHandler; /** * Shown while no date is committed. * @default 'Select a date' */ placeholder?: string; /** * Sets `aria-required` on the field control. A surrounding Field owns the visual required affordance. * @default false */ required?: boolean; /** * Controlled popup visibility. */ open?: boolean; /** * Initial popup visibility when uncontrolled. * @default false */ defaultOpen?: boolean; /** * Called when user interaction requests a popup visibility change. */ onOpenChange?: EventHandler; /** * Shows the calendar's Go-to-today button, which shows today's month and focuses today. Style the button through * `calendar.goToTodayButton`. * @default false */ showGoToToday?: boolean; /** * Value of today. Pass this explicitly while server rendering to keep server and client output consistent. */ today?: Date; /** * Inclusive local-date lower boundary for calendar and typed dates. */ minDate?: Date; /** * Inclusive local-date upper boundary for calendar and typed dates. */ maxDate?: Date; /** * Formats the committed date for display. * @default English long date, such as "August 12, 2026" */ formatDate?: (date: Date) => string; /** * Parses typed text into a local date, returning `null` when the text is not a valid date. * The default accepts `YYYY-MM-DD`, an English month name followed by day and four-digit year, and `M/D/YYYY`. */ parseDate?: (text: string) => Date | null; /** * Describes a validation error in `errorMessage`, including an accepted format or the allowed range. */ formatErrorMessage?: (data: DatePickerErrorMessageData) => string; /** * Where the popup opens relative to the field. * @default { position: 'below', align: 'start' } */ positioning?: PositioningShorthand; }; /** * Props for a DatePicker with a non-editable field. Native props and the forwarded ref target the `