import { default as React, ReactNode } from 'react'; import { SingleLineTextInputProps } from '../TextInput'; import { Options } from 'flatpickr/dist/types/options'; export interface DateInputProps extends Omit { /** Fired with 'YYYY-MM-DD' selected date string when selected date changes */ onChange?: (date: string) => void; /** Disables dates. See [flatpickr docs](https://flatpickr.js.org/examples/#disabling-dates) for usage instructions */ disableDates?: Options["disable"]; /** Sets the minimum selectable date (inclusive) */ minDate?: string | Date; /** Alternate date format to show in input when a date is selected (e.g. 'm/d/Y')*/ altFormat?: string; /** * When true, the input value will follow an alternate format defined by the `altFormat` prop */ altInput?: boolean; /** * Sets a default selected date. * DateInput uses the format 'YYYY-MM-DD' by default. */ defaultDate?: string; /** Changes date format used in input. See [flatpickr docs](https://flatpickr.js.org/formatting/) for formatting options */ dateFormat?: string; /** If the `onChange` callback should pass the date string in ISO8601 format */ useIsoOnChange?: boolean; /** Disable mobile text inputs on mobile web */ disableMobile?: boolean; /** When true, appends the calendar popup to the parent of the input instead of to document body */ disablePortal?: boolean; /** Custom render function for the input element (props, input, testId) => */ renderInput?: (props: Omit, input: React.MutableRefObject, testId?: string) => ReactNode; } /** * Single day picker. * Composes NDS input with a [flatpickr](http://flatpickrjs.org) calendar UI. */ declare const DateInput: ({ disableDates, minDate, dateFormat, altInput, altFormat, defaultDate, onChange: onChangeProp, useIsoOnChange, disableMobile, testId, disablePortal, renderInput, ...props }: DateInputProps) => React.JSX.Element; export default DateInput; //# sourceMappingURL=index.d.ts.map