UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

21 lines (20 loc) 916 B
import type { FieldPropsWithExtraValue, Validator, ValidatorWithCustomValidators } from '../../types'; export type AdditionalArgs = { day: string; month: string; year: string; }; export type DateOfBirthValidator = ValidatorWithCustomValidators<string, { dateOfBirthValidator: Validator<string>; }>; export type FieldDateOfBirthProps = Omit<FieldPropsWithExtraValue<string, AdditionalArgs, undefined | string>, 'layout' | 'layoutOptions'> & { validate?: boolean; dateFormat?: string; onDayChange?: (value: string | undefined) => void; onMonthChange?: (value: string | undefined) => void; onYearChange?: (value: string | undefined) => void; onBlurValidator?: DateOfBirthValidator | false; }; export declare const DEFAULT_DATE_FORMAT = "yyyy-MM-dd"; declare function DateOfBirth(props: FieldDateOfBirthProps): import("react/jsx-runtime").JSX.Element; export default DateOfBirth;