@wix/design-system
Version:
@wix/design-system
31 lines • 1.4 kB
TypeScript
import React from 'react';
import { SupportedWixLocales } from '@wix/design-systems-locale-utils';
import { WixStyleReactEnvironmentContext } from '../../WixStyleReactEnvironmentProvider/context';
import { DateInputProps } from './DateInput.types';
type ValidationType = 'valid' | 'formatError' | 'outOfBoundsError';
type DateInputState = {
validationType: ValidationType;
inputValue: string;
statusMessage?: string;
};
declare class DateInput extends React.PureComponent<DateInputProps, DateInputState> {
static displayName: string;
static contextType: React.Context<import("../..").WixStyleReactEnvironmentProviderProps>;
context: React.ContextType<typeof WixStyleReactEnvironmentContext>;
constructor(props: DateInputProps);
componentDidMount(): void;
componentDidUpdate(prevProps: DateInputProps): void;
_getFormattedDate: (value?: Date | string) => string;
_handleBlur: () => void;
_handleChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
_handleValidation: (date: {
parsedDate?: Date | null;
dateFormat: string;
}) => void;
_handleClear: (event: React.MouseEvent<HTMLButtonElement>) => void;
_handleKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
_getLocale(): SupportedWixLocales;
render(): React.JSX.Element;
}
export default DateInput;
//# sourceMappingURL=DateInput.d.ts.map