Back to Fluentui

React Datepicker Compat.Api

packages/react-components/react-datepicker-compat/library/etc/react-datepicker-compat.api.md

4.40.2-hotfix23.3 KB
Original Source

API Report File for "@fluentui/react-datepicker-compat"

Do not edit this file. It is a report generated by API Extractor.

ts

import type { CalendarProps } from '@fluentui/react-calendar-compat';
import { CalendarStrings } from '@fluentui/react-calendar-compat';
import type { ComponentProps } from '@fluentui/react-utilities';
import type { ComponentState } from '@fluentui/react-utilities';
import type { DateFormatting } from '@fluentui/react-calendar-compat';
import { DayOfWeek } from '@fluentui/react-calendar-compat';
import { FirstWeekOfYear } from '@fluentui/react-calendar-compat';
import type { ForwardRefComponent } from '@fluentui/react-utilities';
import { Input } from '@fluentui/react-input';
import type { JSXElement } from '@fluentui/react-utilities';
import type { PortalProps } from '@fluentui/react-portal';
import type { PositioningProps } from '@fluentui/react-positioning';
import * as React_2 from 'react';
import type { Slot } from '@fluentui/react-utilities';
import type { SlotClassNames } from '@fluentui/react-utilities';

export { CalendarStrings }

// @public (undocumented)
export const DatePicker: ForwardRefComponent<DatePickerProps>;

// @public (undocumented)
export const datePickerClassNames: SlotClassNames<DatePickerSlots>;

// @public
export type DatePickerErrorType = 'invalid-input' | 'out-of-bounds' | 'required-input';

// @public (undocumented)
export type DatePickerProps = Omit<ComponentProps<Partial<DatePickerSlots>>, 'defaultValue' | 'value'> & Pick<PortalProps, 'mountNode'> & {
    onSelectDate?: (date: Date | null | undefined) => void;
    required?: boolean;
    disabled?: boolean;
    underlined?: boolean;
    isMonthPickerVisible?: boolean;
    showMonthPickerAsOverlay?: boolean;
    allowTextInput?: boolean;
    disableAutoFocus?: boolean;
    openOnClick?: boolean;
    defaultOpen?: boolean;
    open?: boolean;
    onOpenChange?: (open: boolean) => void;
    onValidationResult?: (data: DatePickerValidationResultData) => void;
    inlinePopup?: boolean;
    positioning?: PositioningProps;
    placeholder?: string;
    today?: Date;
    value?: Date | null;
    formatDate?: (date?: Date) => string;
    parseDateFromString?: (dateStr: string) => Date | null;
    firstDayOfWeek?: DayOfWeek;
    strings?: CalendarStrings;
    highlightCurrentMonth?: boolean;
    highlightSelectedMonth?: boolean;
    showWeekNumbers?: boolean;
    firstWeekOfYear?: FirstWeekOfYear;
    showGoToToday?: boolean;
    borderless?: boolean;
    dateTimeFormatter?: DateFormatting;
    minDate?: Date;
    maxDate?: Date;
    initialPickerDate?: Date;
    allFocusable?: boolean;
    showCloseButton?: boolean;
};

// @public
export type DatePickerValidationResultData = {
    error?: DatePickerErrorType;
};

// @public (undocumented)
export const defaultDatePickerErrorStrings: Record<DatePickerErrorType, string>;

// @public (undocumented)
export const defaultDatePickerStrings: CalendarStrings;

// @public
export const renderDatePicker_unstable: (state: DatePickerState) => JSXElement;

// @public
export const useDatePicker_unstable: (props: DatePickerProps, ref: React_2.Ref<HTMLInputElement>) => DatePickerState;

// @public
export const useDatePickerStyles_unstable: (state: DatePickerState) => DatePickerState;

// (No @packageDocumentation comment for this package)