import type { Instance } from "../../ui/Instance"; import { FieldInstance } from "./Field"; import type { RenderingContext } from "../../ui/RenderingContext"; import { DropdownConfig } from "../overlay/Dropdown"; import { Field, FieldConfig } from "./Field"; import { BooleanProp, Config, Prop, StringProp } from "../../ui/Prop"; export interface DateTimeFieldConfig extends FieldConfig { /** Selected date. This should be a Date object or a valid date string consumable by Date.parse function. */ value?: Prop; /** Defaults to false. Used to make the field read-only. */ readOnly?: BooleanProp; /** The opposite of `disabled`. */ enabled?: BooleanProp; /** Default text displayed when the field is empty. */ placeholder?: StringProp; /** Minimum date value. This should be a Date object or a valid date string consumable by Date.parse function. */ minValue?: Prop; /** Set to `true` to disallow the `minValue`. Default value is `false`. */ minExclusive?: BooleanProp; /** Maximum date value. This should be a Date object or a valid date string consumable by Date.parse function. */ maxValue?: Prop; /** Set to `true` to disallow the `maxValue`. Default value is `false`. */ maxExclusive?: BooleanProp; /** Date format used to display the selected date. */ format?: StringProp; /** Base CSS class to be applied to the field. Defaults to `datefield`. */ baseClass?: string; /** Maximum value error text. */ maxValueErrorText?: string; /** Maximum exclusive value error text. */ maxExclusiveErrorText?: string; /** Minimum value error text. */ minValueErrorText?: string; /** Minimum exclusive value error text. */ minExclusiveErrorText?: string; /** Error message used to indicate wrong user input. */ inputErrorText?: string; /** Name or configuration of the icon to be put on the left side of the input. */ icon?: StringProp | Config; /** Set to false to hide the clear button. Default value is true. */ showClear?: boolean; /** Set to `true` to display the clear button even if `required` is set. Default is `false`. */ alwaysShowClear?: boolean; /** Set to true to hide the clear button. Default value is false. */ hideClear?: boolean; /** Determines which segment of date/time is used. Default value is `datetime`. */ segment?: "date" | "time" | "datetime"; /** Set to `true` to indicate that only one segment of the selected date is affected. */ partial?: boolean; /** The function that will be used to convert Date objects before writing data to the store. */ encoding?: (date: Date) => any; /** Defines which days of week should be displayed as disabled. */ disabledDaysOfWeek?: number[]; /** Set to true to focus the input field instead of the picker first. */ focusInputFirst?: boolean; /** Set to true to enable seconds segment in the picker. */ showSeconds?: boolean; /** Additional configuration to be passed to the dropdown. */ dropdownOptions?: Partial; /** Type of picker to show. Can be `calendar`, `time`, `list`, or `auto`. Default is `auto`. */ picker?: "calendar" | "time" | "list" | "auto"; /** Time step in minutes for the time picker. */ step?: number; /** Custom validation function. */ onValidate?: string | ((value: string | Date, instance: Instance, validationParams: Record) => unknown); } export declare class DateTimeField extends Field { showClear?: boolean; alwaysShowClear?: boolean; hideClear?: boolean; format?: string; segment?: string; maxValueErrorText?: string; maxExclusiveErrorText?: string; minValueErrorText?: string; minExclusiveErrorText?: string; inputErrorText?: string; disabledDaysOfWeekErrorText?: string; value?: unknown; minValue?: unknown; maxValue?: unknown; minExclusive?: boolean; maxExclusive?: boolean; picker?: string; partial?: boolean; encoding?: (date: Date) => string; disabledDaysOfWeek?: number[] | null; reactOn?: string; focusInputFirst?: boolean; dropdownOptions?: Partial; onParseInput?: string | ((date: unknown, instance: Instance) => Date | undefined); showSeconds?: boolean; step?: number; constructor(config?: DateTimeFieldConfig); declareData(...args: Record[]): void; init(): void; prepareData(context: RenderingContext, instance: FieldInstance): void; validate(context: RenderingContext, instance: FieldInstance): void; renderInput(context: RenderingContext, instance: FieldInstance, key: string): React.ReactNode; formatValue(context: RenderingContext, { data }: Instance): React.ReactNode; parseDate(date: unknown, instance: Instance): Date | null; } //# sourceMappingURL=DateTimeField.d.ts.map