UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

22 lines (21 loc) 860 B
/** * Web DatePicker Component * */ import type { HTMLProps, ReactNode } from 'react'; export type DatePickerShortcut = { title?: string; date?: string | Date | ((...args: unknown[]) => Date); startDate?: string | Date | ((...args: unknown[]) => Date); endDate?: string | Date | ((...args: unknown[]) => Date); closeOnSelect?: boolean; }; export type DatePickerAddonProps = HTMLProps<HTMLElement> & { /** * Gives you the possibility to set predefined dates and date ranges so the user can select these by one click. Define either a JSON or an object with the defined shortcuts. More info is below. */ shortcuts?: Array<DatePickerShortcut> | string; renderElement?: ReactNode; }; declare function DatePickerAddon(props: DatePickerAddonProps): import("react/jsx-runtime").JSX.Element; export default DatePickerAddon;