@appello/web-ui
Version:
Web ui library for a better development experience
25 lines (24 loc) • 1.24 kB
TypeScript
import { Nullable } from '@appello/common';
import React, { ReactNode } from 'react';
import { DateRange, Matcher } from 'react-day-picker';
import { DatePickerBaseProps, DatePickerDefaultProps, DatePickerRangeProps } from '../../../components/common/DatePickerPopup';
import { IconName } from '../../../components/common/Icon';
import { InputSize } from '../../../components/form/TextInput';
export type DateInputProps = (DatePickerRangeProps | DatePickerDefaultProps) & Pick<DatePickerBaseProps, 'yearsLength' | 'toYear' | 'fromYear' | 'weekStartsOn' | 'containerWrapperClassName' | 'containerClassName'> & {
placeholder?: string;
inputSize?: InputSize;
error?: boolean;
className?: string;
disabledDate?: Matcher;
iconAfterName?: IconName;
disabled?: boolean;
rightElement?: ReactNode;
iconAfterElementClassName?: string;
inputClassName?: string;
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
formatInputValue?: (value: Date | Nullable<DateRange>) => string;
};
export interface DateInputRefProps {
setShowCalendar: (val: boolean) => void;
}
export declare const DateInput: React.ForwardRefExoticComponent<DateInputProps & React.RefAttributes<DateInputRefProps>>;