UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

74 lines (73 loc) 2.13 kB
import { EventEmitter, VNode } from "../../stencil-public-runtime"; import { DatePickerMessages } from "../date-picker/assets/date-picker/t9n"; import { DateLocaleData } from "../date-picker/utils"; import { HeadingLevel } from "../functional/Heading"; import { Scale } from "../interfaces"; export declare class DatePickerMonthHeader { el: HTMLCalciteDatePickerMonthHeaderElement; /** Already selected date. */ selectedDate: Date; /** Focused date with indicator (will become selected date if user proceeds) */ activeDate: Date; /** * Specifies the number at which section headings should start. */ headingLevel: HeadingLevel; /** Specifies the earliest allowed date (`"yyyy-mm-dd"`). */ min: Date; /** Specifies the latest allowed date (`"yyyy-mm-dd"`). */ max: Date; /** Specifies the size of the component. */ scale: Scale; /** CLDR locale data for translated calendar info */ localeData: DateLocaleData; /** * This property specifies accessible strings for the component's previous month button ,next month button & year input elements. * Made into a prop for testing purposes only. * * @internal * @readonly */ messages: DatePickerMessages; /** * Changes to active date * * @internal */ calciteInternalDatePickerSelect: EventEmitter<Date>; componentWillLoad(): void; connectedCallback(): void; render(): VNode; renderContent(): VNode; private yearInput; private parentDatePickerEl; nextMonthDate: Date; prevMonthDate: Date; setNextPrevMonthDates(): void; /** * Increment year on UP/DOWN keys * * @param event */ private onYearKey; private formatCalendarYear; private parseCalendarYear; private onYearChange; private onYearInput; private prevMonthClick; private prevMonthKeydown; private nextMonthClick; private nextMonthKeydown; private handleArrowClick; private getInRangeDate; /** * Parse localized year string from input, * set to active if in range * * @param root0 * @param root0.localizedYear * @param root0.commit * @param root0.offset */ private setYear; }