baseui
Version:
A React Component library implementing the Base design language
53 lines (52 loc) • 2.24 kB
TypeScript
import * as React from 'react';
import type { DatepickerProps, InputRole } from './types';
import DateHelpers from './utils/date-helpers';
import type { Locale } from '../locale';
import type { ChangeEvent } from 'react';
export declare const DEFAULT_DATE_FORMAT = "yyyy/MM/dd";
type DatepickerState = {
calendarFocused: boolean;
isOpen: boolean;
selectedInput: InputRole | undefined | null;
isPseudoFocused: boolean;
lastActiveElm: HTMLElement | undefined | null;
inputValue?: string;
ariaDescribedby: string | null;
};
export default class Datepicker_DO_NOT_USE<T = Date> extends React.Component<DatepickerProps<T>, DatepickerState> {
static defaultProps: {
'aria-describedby': any;
value: any;
formatString: string;
adapter: import("./utils/types").DateIOAdapter<Date>;
};
calendar: HTMLElement | undefined | null;
dateHelpers: DateHelpers<T>;
calendarID: string;
constructor(props: DatepickerProps<T>);
componentDidMount(): void;
handleChange: (a: T | undefined | null | Array<T | undefined | null>) => void;
onCalendarSelect: (a: {
readonly date: T | undefined | null | Array<T | undefined | null>;
}) => void;
getNullDatePlaceholder(formatString: string): string;
formatDate(date: T | undefined | null | Array<T | undefined | null>, formatString: string): string;
formatDisplayValue: (a: T | undefined | null | Array<T | undefined | null>) => string;
open: (inputRole?: InputRole) => void;
close: () => void;
handleEsc: () => void;
handleInputBlur: () => void;
getMask: () => string;
handleInputChange: (event: ChangeEvent<HTMLInputElement>, inputRole?: InputRole) => void;
handleKeyDown: (event: KeyboardEvent, inputRole?: InputRole) => void;
focusCalendar: () => void;
normalizeDashes: (inputValue: string) => string;
generateAriaDescribedByIds: () => string;
hasLockedBehavior: () => boolean;
componentDidUpdate(prevProps: DatepickerProps<T>): void;
getPlaceholder: () => string;
renderInputComponent(locale: Locale, inputRole?: InputRole): React.JSX.Element;
renderCalendarSelect(): React.JSX.Element;
render(): React.JSX.Element;
}
export {};