UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

40 lines (39 loc) 1.54 kB
/// <reference types="react" /> import * as React from 'react'; import { ICalendar, ICalendarProps } from './Calendar.types'; import { CalendarDay } from './CalendarDay'; import { CalendarMonth } from './CalendarMonth'; import { BaseComponent } from '../../Utilities'; export interface ICalendarState { /** The currently focused date in the calendar, but not necessarily selected */ navigatedDate?: Date; /** The currently selected date in the calendar */ selectedDate?: Date; /** State used to show/hide month picker */ isMonthPickerVisible?: boolean; /** State used to show/hide day picker */ isDayPickerVisible?: boolean; } export declare class Calendar extends BaseComponent<ICalendarProps, ICalendarState> implements ICalendar { static defaultProps: ICalendarProps; refs: { [key: string]: React.ReactInstance; root: HTMLElement; dayPicker: CalendarDay; monthPicker: CalendarMonth; }; private _focusOnUpdate; constructor(props: ICalendarProps); componentWillReceiveProps(nextProps: ICalendarProps): void; componentDidUpdate(): void; render(): JSX.Element; focus(): void; private _navigateDay(date); private _onNavigateDate(date, focusOnNavigatedDay); private _onSelectDate(date, selectedDateRangeArray?); private _onHeaderSelect(focus); private _onGotoToday(); private _onGotoTodayKeyDown(ev); private _onDatePickerPopupKeyDown(ev); private _handleEscKey(ev); }