import { Nullable } from '../../types/index.js'; import { SharedFormElementProps } from '../OnyxFormElement/types.js'; export type OnyxDatePickerProps = Omit & { /** * A date string compliant with [ISO8601](https://en.wikipedia.org/wiki/ISO_8601). * @example "date.toISOString()" * @example "2011-10-31" */ modelValue?: Nullable; /** * Whether the user should be able to select only date or date + time. */ type?: "date" | "datetime-local"; /** * Min. / earliest selectable date (inclusive). * When using `type="datetime-local"`, the user can still select a invalid time but the datepicker will show an error. */ min?: DateValue; /** * Max. / latest selectable date (inclusive). * When using `type="datetime-local"`, the user can still select a invalid time but the datepicker will show an error. */ max?: DateValue; }; /** Data types that are parsable as date via `new Date()`. */ export type DateValue = ConstructorParameters[0];