UNPKG

@yamada-ui/calendar

Version:

Yamada UI calendar component

108 lines (105 loc) 3.26 kB
import * as _yamada_ui_core from '@yamada-ui/core'; import { ThemeProps, FC, HTMLUIProps } from '@yamada-ui/core'; import { MotionProps } from '@yamada-ui/motion'; import { PortalProps } from '@yamada-ui/portal'; import { ReactNode } from 'react'; import { DatePickerIconProps } from './date-picker.js'; import { UseRangeDatePickerProps } from './use-range-date-picker.js'; import '@yamada-ui/icon'; import './use-date-picker.js'; import '@yamada-ui/popover'; import './calendar.js'; import './calendar-header.js'; import '@yamada-ui/button'; import './use-calendar-header.js'; import './month.js'; import './month-list.js'; import './use-calendar.js'; import 'dayjs'; import './year-list.js'; import './use-calendar-picker.js'; import '@yamada-ui/form-control'; interface RangeDatePickerOptions { children?: FC<{ value: [Date?, Date?]; onClose: () => void; }> | ReactNode; /** * If `true`, display the month picker clear icon. * * @default true */ clearable?: boolean; /** * The border color when the input is invalid. */ errorBorderColor?: string; /** * The border color when the input is focused. */ focusBorderColor?: string; /** * If `true`, display the date picker clear icon. * * @default true * * @deprecated Use `clearable` instead. */ isClearable?: boolean; /** * The visual separator between each value. * * @default '-' */ separator?: string; /** * Props for date picker clear icon element. */ clearIconProps?: DatePickerIconProps; /** * Props for date picker container element. */ containerProps?: Omit<HTMLUIProps, "children">; /** * Props for date picker container element. */ contentProps?: Omit<MotionProps, "children">; /** * Props for date picker end input element. */ endInputProps?: HTMLUIProps<"input">; /** * Props for date picker field element. */ fieldProps?: Omit<HTMLUIProps, "children">; /** * Props for date picker icon element. */ iconProps?: DatePickerIconProps; /** * Props to be forwarded to the portal component. * * @default '{ disabled: true }' * */ portalProps?: Omit<PortalProps, "children">; /** * Props for date picker start input element. */ startInputProps?: HTMLUIProps<"input">; } interface RangeDatePickerProps extends ThemeProps<"DatePicker">, RangeDatePickerOptions, UseRangeDatePickerProps { } /** * `RangeDatePicker` is a component used for users to select a range of dates. * * @see Docs https://yamada-ui.com/components/forms/range-date-picker */ declare const RangeDatePicker: _yamada_ui_core.Component<"input", RangeDatePickerProps>; interface RangeDatePickerFieldOptions { value: [Date?, Date?] | undefined; } interface RangeDatePickerFieldProps extends HTMLUIProps, Pick<RangeDatePickerProps, "endInputProps" | "separator" | "startInputProps">, RangeDatePickerFieldOptions { } declare const RangeDatePickerField: _yamada_ui_core.Component<"input", RangeDatePickerFieldProps>; export { RangeDatePicker, RangeDatePickerField, type RangeDatePickerFieldProps, type RangeDatePickerProps };