UNPKG

@blueprintjs/datetime

Version:

Components for interacting with dates and times

28 lines (27 loc) 1.02 kB
import * as React from "react"; import type { CaptionElementProps } from "react-day-picker"; import { AbstractPureComponent } from "@blueprintjs/core"; export interface DatePickerCaptionProps extends CaptionElementProps { maxDate: Date; minDate: Date; onMonthChange?: (month: number) => void; onYearChange?: (year: number) => void; /** Callback invoked when the month or year `<select>` is changed. */ onDateChange?: (date: Date) => void; reverseMonthAndYearMenus?: boolean; } export interface DatePickerCaptionState { monthRightOffset: number; } export declare class DatePickerCaption extends AbstractPureComponent<DatePickerCaptionProps, DatePickerCaptionState> { state: DatePickerCaptionState; private containerElement; private displayedMonthText; private handleMonthSelectChange; private handleYearSelectChange; render(): React.JSX.Element; componentDidMount(): void; componentDidUpdate(): void; private positionArrows; private dateChangeHandler; }