/** * Copyright 2024, SumUp Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { type InputHTMLAttributes } from 'react'; import type { Placement } from '@floating-ui/react-dom'; import type { InputProps } from '../Input/Input.js'; import { type CalendarProps } from '../Calendar/Calendar.js'; import { type FieldSize } from '../Field/Field.js'; export interface DateInputProps extends Omit, 'size'>, Pick, Pick { /** * The currently selected date in the [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) * format (`YYYY-MM-DD`). */ value?: string; /** * The initially selected date in the [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) * format (`YYYY-MM-DD`). */ defaultValue?: string; /** * Visually hidden label for the year input. */ yearInputLabel?: string; /** * Visually hidden label for the month input. */ monthInputLabel?: string; /** * Visually hidden label for the day input. */ dayInputLabel?: string; /** * Label for the trailing button that opens the calendar dialog. */ openCalendarButtonLabel?: string; /** * Label for the button to close the calendar dialog. */ closeCalendarButtonLabel?: string; /** * Label for the button to apply the selected date and close the calendar dialog. */ applyDateButtonLabel?: string; /** * Label for the button to clear the date value and close the calendar dialog. */ clearDateButtonLabel?: string; /** * The minimum selectable date in the [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) * format (`YYYY-MM-DD`) (inclusive). */ min?: string; /** * The maximum selectable date in the [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) * format (`YYYY-MM-DD`) (inclusive). */ max?: string; /** * A hint to the user agent specifying how to prefill the input. */ autoComplete?: 'bday'; /** * One of the accepted placement values. Defaults to `bottom-end`. */ placement?: Placement; /** * Choose from 2 sizes. * @default m */ size?: FieldSize; } /** * The DateInput component allows users to type or select a specific date. * The input value is always a string in the format `YYYY-MM-DD`. */ export declare const DateInput: import("react").ForwardRefExoticComponent>;