import { EventEmitter } from '../../stencil-public-runtime'; import { DateTime } from 'luxon'; import type { DateTimeCardCorners } from '../date-time-card/date-time-card.types'; import { IxDatePickerComponent } from './date-picker-component'; import type { DateChangeEvent } from './date-picker.events'; export declare class DatePicker implements IxDatePickerComponent { hostElement: HTMLIxDatePickerElement; /** * Date format string. * See {@link https://moment.github.io/luxon/#/formatting?id=table-of-tokens} for all available tokens. */ format: string; /** * If true, disables date range selection (from/to). */ singleSelection: boolean; /** * Corner style. */ corners: DateTimeCardCorners; /** * The selected starting date. If the date picker is not in range mode, this is the selected date. * Format has to match the `format` property. */ from: string | undefined; watchFromPropHandler(newValue: string): void; /** * The selected end date. If the date picker is not in range mode, this property has no impact. * Format has to match the `format` property. */ to: string | undefined; watchToPropHandler(newValue: string): void; /** * The earliest date that can be selected by the date picker. * If not set there will be no restriction. */ minDate: string; /** * The latest date that can be selected by the date picker. * If not set there will be no restriction. */ maxDate: string; /** * Text of the date select button. */ i18nDone: string; /** * ARIA label for the previous month icon button. * Will be set as aria-label on the nested HTML button element. */ ariaLabelPreviousMonthButton?: string; /** * ARIA label for the next month icon button. * Will be set as aria-label on the nested HTML button element. */ ariaLabelNextMonthButton?: string; /** * The index of which day to start the week on, based on the Locale#weekdays array. * E.g. if the locale is en-us, weekStartIndex = 1 results in starting the week on Monday. */ weekStartIndex: number; /** * Locale identifier (e.g. 'en' or 'de'). * The locale is used to translate the labels for weekdays and months. * It also determines the default order of weekdays based on the locale's conventions. * When the locale changes, the weekday labels are rotated according to the `weekStartIndex`. * It does not affect the values returned by methods and events. */ locale?: string; onLocaleChange(): void; /** * Shows week numbers displayed on the left side of the date picker. * * @since 3.0.0 */ showWeekNumbers: boolean; /** @internal */ embedded: boolean; /** @internal */ today: string; /** * Enable Popover API rendering for dropdown. * * @default false * @since 4.3.0 */ enableTopLayer: boolean; /** * Emitted when the date selection changes. The `DateChangeEvent` contains `from` and `to` properties. * The property strings are formatted according to the `format` property and not affected by the `locale` property. * The locale applied is always `en-US`. * Note: Since 2.0.0 `dateChange` does not dispatch detail property as `string` */ dateChange: EventEmitter; /** * Date range change event. Emitted when the date range selection changes and the component is in range mode. The `DateChangeEvent` contains `from` and `to` properties. * The property strings are formatted according to the `format` property and not affected by the `locale` property. * The locale applied is always `en-US`. */ dateRangeChange: EventEmitter; /** * Date selection event. Emitted when the selection is confirmed via the date select button. The `DateChangeEvent` contains `from` and `to` properties. * The property strings are formatted according to the `format` property and not affected by the `locale` property. * The locale applied is always `en-US`. */ dateSelect: EventEmitter; /** * Get the currently selected date or range. The object returned contains `from` and `to` properties. * The property strings are formatted according to the `format` property and not affected by the `locale` property. * The locale applied is always `en-US`. */ getCurrentDate(): Promise; currFromDate?: DateTime; currToDate?: DateTime; selectedYear: number; tempYear: number; startYear: number; endYear: number; selectedMonth: number; tempMonth: number; private readonly dropdownButtonRef; private readonly yearContainerRef; private readonly firstMonthRef; dayNames: string[]; monthNames: string[]; focusedDay: number; private isDayFocus; private monthChangedFromFocus; private readonly DAYS_IN_WEEK; private calendar; handleKeyUp(event: KeyboardEvent): void; private getDaysInCurrentMonth; private getDateTimeNow; private parseDateString; private updateSelectedYearMonth; onDayBlur(): void; onDayFocus(): void; componentWillLoad(): void; componentWillRender(): void; componentDidRender(): void; private setTranslations; /** * Rotate the WeekdayNames array. * Based on the position that should be the new 0-index. */ private rotateWeekDayNames; private onDone; private calculateCalendar; private selectTempYear; private focusMonth; private infiniteScrollYears; private selectMonth; private changeToAdjacentMonth; private selectDay; private onDateChange; private getDayClasses; private isWithinMinMaxYear; private isWithinMinMaxMonth; private isWithinMinMaxDate; private renderYears; render(): any; }