react-semantic-ui-datepickers
Version:
Datepickers built with Semantic UI for React and Dayzed
79 lines (78 loc) • 2.64 kB
TypeScript
import React from 'react';
import { Locale, SemanticDatepickerProps } from './types';
declare type SemanticDatepickerState = {
isVisible: boolean;
locale: Locale;
selectedDate: Date | Date[] | null;
selectedDateFormatted?: string;
typedValue: string | null;
};
declare class SemanticDatepicker extends React.Component<SemanticDatepickerProps, SemanticDatepickerState> {
static defaultProps: {
allowOnlyNumbers: boolean;
clearOnSameDateClick: boolean;
clearable: boolean;
date: undefined;
filterDate: () => boolean;
firstDayOfWeek: number;
format: string;
id: undefined;
keepOpenOnClear: boolean;
keepOpenOnSelect: boolean;
label: undefined;
locale: string;
name: undefined;
onBlur: () => void;
onChange: () => void;
placeholder: null;
pointing: string;
readOnly: boolean;
datePickerOnly: boolean;
required: boolean;
showOutsideDays: boolean;
type: string;
value: null;
};
el: React.RefObject<HTMLDivElement>;
componentDidUpdate(prevProps: SemanticDatepickerProps): void;
get isRangeInput(): boolean;
get initialState(): {
isVisible: boolean;
locale: Locale;
selectedDate: Date | Date[] | null;
selectedDateFormatted: string | undefined;
typedValue: null;
};
get dayzedProps(): {
[x: string]: any;
};
get inputProps(): {
placeholder: any;
};
get date(): any;
get locale(): Locale;
get weekdays(): any[];
state: {
isVisible: boolean;
locale: Locale;
selectedDate: Date | Date[] | null;
selectedDateFormatted: string | undefined;
typedValue: null;
};
Component: React.ElementType;
resetState: (event: any) => void;
mousedownCb: (mousedownEvent: any) => void;
keydownCb: (keydownEvent: any) => void;
close: () => void;
showCalendar: (event: any) => void;
handleRangeInput: (newDates: any, event: any) => void;
handleBasicInput: (newDate: any, event: any) => void;
handleBlur: (event?: React.SyntheticEvent<Element, Event> | undefined) => void;
handleChange: (event: React.SyntheticEvent<Element, Event>, { value }: {
value: any;
}) => void;
handleKeyDown: (evt: any) => void;
onDateSelected: (event: React.SyntheticEvent<Element, Event> | undefined, dateOrDates: any) => void;
render(): JSX.Element;
}
export default SemanticDatepicker;