@material-ui/lab
Version:
Material-UI Lab - Incubator for Material-UI React components.
67 lines (66 loc) • 2.63 kB
TypeScript
import * as React from 'react';
import { ButtonBaseProps } from '@material-ui/core/ButtonBase';
import { WithStyles, Theme } from '@material-ui/core/styles';
import { ExtendMui } from '../internal/pickers/typings/helpers';
import { PickerSelectionState } from '../internal/pickers/hooks/usePickerState';
export declare const styles: (theme: Theme) => Record<"disabled" | "selected" | "root" | "dayWithMargin" | "dayOutsideMonth" | "hiddenDaySpacingFiller" | "today" | "dayLabel", import("../../../material-ui-styles/src").CSSProperties | import("../../../material-ui-styles/src").CreateCSSProperties<{}> | import("../../../material-ui-styles/src").PropsFunc<{}, import("../../../material-ui-styles/src").CreateCSSProperties<{}>>>;
export declare type PickersDayClassKey = keyof WithStyles<typeof styles>['classes'];
export interface PickersDayProps<TDate> extends ExtendMui<ButtonBaseProps> {
/**
* The date to show.
*/
day: TDate;
/**
* If `true`, the day element will be focused during the first mount.
*/
focused?: boolean;
/**
* If `true`, allows to focus by tabbing.
*/
focusable?: boolean;
/**
* If `true`, day is outside of month and will be hidden.
*/
outsideCurrentMonth: boolean;
/**
* If `true`, renders as today date.
*/
today?: boolean;
/**
* If `true`, renders as disabled.
*/
disabled?: boolean;
/**
* If `true`, renders as selected.
*/
selected?: boolean;
/**
* If `true`, keyboard control and focus management is enabled.
*/
allowKeyboardControl?: boolean;
/**
* If `true`, days are rendering without margin. Useful for displaying linked range of days.
*/
disableMargin?: boolean;
/**
* If `true`, days that have `outsideCurrentMonth={true}` are displayed.
* @default false
*/
showDaysOutsideCurrentMonth?: boolean;
/**
* If `true`, todays date is rendering without highlighting with circle.
* @default false
*/
disableHighlightToday?: boolean;
/**
* If `true`, `onChange` is fired on click even if the same date is selected.
* @default false
*/
allowSameDateSelection?: boolean;
isAnimating?: boolean;
onDayFocus?: (day: TDate) => void;
onDaySelect: (day: TDate, isFinish: PickerSelectionState) => void;
}
export declare const areDayPropsEqual: (prevProps: PickersDayProps<any>, nextProps: PickersDayProps<any>) => boolean;
declare const _default: <TDate>(props: PickersDayProps<TDate> & React.RefAttributes<HTMLButtonElement>) => JSX.Element;
export default _default;