UNPKG

@adaptui/react

Version:

Collection of headless components/hooks that are accessible, composable, customizable from low level to build your own UI & Design System powered by Reakit

22 lines (21 loc) 1.02 kB
import { Calendar } from "@internationalized/date"; import { DateFieldState } from "@react-stately/datepicker"; import { DatePickerProps, DateValue, Granularity } from "@react-types/datepicker"; export declare function useDateFieldBaseState(props: DateFieldBaseStateProps): DateFieldBaseState; export declare type DateFieldBaseState = DateFieldState & {}; export declare type DateFieldBaseStateProps = DatePickerProps<DateValue> & { /** * The maximum unit to display in the date field. * @default 'year' */ maxGranularity?: "year" | "month" | Granularity; /** The locale to display and edit the value according to. */ locale: string; /** * A function that creates a [Calendar](../internationalized/date/Calendar.html) * object for a given calendar identifier. Such a function may be imported from the * `@internationalized/date` package, or manually implemented to include support for * only certain calendars. */ createCalendar: (name: string) => Calendar; };