/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { Directionality } from '@angular/cdk/bidi'; import { Overlay, OverlayRef, ScrollStrategy } from '@angular/cdk/overlay'; import { AfterViewInit, EventEmitter, InjectionToken, NgZone, OnDestroy, OnInit, ViewContainerRef } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { Subject } from 'rxjs'; import { MatCalendar, MatCalendarType, MatCalendarView } from './calendar'; import { DateAdapter } from './core/index'; import { MatDatepickerInput } from './datepicker-input'; import * as i0 from "@angular/core"; /** Injection token that determines the scroll handling while the calendar is open. */ export declare const MAT_DATEPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>; /** @docs-private */ export declare function MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy; /** @docs-private */ export declare const MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER: { provide: InjectionToken<() => ScrollStrategy>; deps: (typeof Overlay)[]; useFactory: typeof MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY; }; /** * Component used as the content for the datepicker dialog and popup. We use this instead of using * MatCalendar directly as the content so we can control the initial focus. This also gives us a * place to put additional features of the popup that are not part of the calendar itself in the * future. (e.g. confirmation buttons). * @docs-private */ export declare class MatDatepickerContent implements AfterViewInit { /** Reference to the internal calendar component. */ _calendar: MatCalendar; /** Reference to the datepicker that created the overlay. */ datepicker: MatDatepicker; /** Whether the datepicker is above or below the input. */ _isAbove: boolean; ngAfterViewInit(): void; /** * Handles keydown event on datepicker content. * @param event The event. */ _handleKeydown(event: KeyboardEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "mat-datepicker-content", ["matDatepickerContent"], {}, {}, never, never, false>; } /** Component responsible for managing the datepicker popup/dialog. */ export declare class MatDatepicker implements OnInit, OnDestroy { private _dialog; private _overlay; private _ngZone; private _viewContainerRef; private _scrollStrategy; _dateAdapter: DateAdapter; private _dir; private _document; /** The date to open the calendar to initially. */ get startAt(): D | null; set startAt(value: D | null); private _startAt; /** The type of value handled by the calendar. */ type: MatCalendarType; /** Which view the calendar should be started in. */ startView: MatCalendarView; /** Clock interval */ clockStep: number; /** Clock hour format */ twelveHour: boolean; color?: string; /** * Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather * than a popup and elements have more padding to allow for bigger touch targets. */ get touchUi(): boolean; set touchUi(value: boolean); private _touchUi; /** Whether the datepicker pop-up should be disabled. */ get disabled(): boolean; set disabled(value: boolean); private _disabled; /** Whether the datepicker is connected to a date type one */ set matDatepicker(value: MatDatepicker); _datepicker: MatDatepicker; /** Classes to be passed to the date picker panel. Supports the same syntax as `ngClass`. */ panelClass: string | string[]; /** Emits when the datepicker has been opened. */ openedStream: EventEmitter; /** Emits when the datepicker has been closed. */ closedStream: EventEmitter; /** Whether the calendar is open. */ get opened(): boolean; set opened(value: boolean); private _opened; /** The id for the datepicker calendar. */ id: string; /** The currently selected date. */ get _selected(): D | null; set _selected(value: D | null); private _validSelected; /** The minimum selectable date. */ get _minDate(): D | null; /** The maximum selectable date. */ get _maxDate(): D | null; get _dateFilter(): (date: D | null, unit?: string) => boolean; /** A reference to the overlay when the calendar is opened as a popup. */ _popupRef: OverlayRef; /** A reference to the dialog when the calendar is opened as a dialog. */ private _dialogRef; /** A portal containing the calendar for this datepicker. */ private _calendarPortal; /** Reference to the component instantiated in popup mode. */ private _popupComponentRef; /** The element that was focused before the datepicker was opened. */ private _focusedElementBeforeOpen; /** Subscription to value changes in the associated input element. */ private _inputSubscription; /** The input element this datepicker is associated with. */ _datepickerInput: MatDatepickerInput; /** Emits when the datepicker is disabled. */ readonly _disabledChange: Subject; /** Emits new selected date when selected date changes. */ readonly _selectedChanged: Subject; constructor(_dialog: MatDialog, _overlay: Overlay, _ngZone: NgZone, _viewContainerRef: ViewContainerRef, _scrollStrategy: any, _dateAdapter: DateAdapter, _dir: Directionality, _document: any); ngOnInit(): void; ngOnDestroy(): void; /** Selects the given date */ select(date: D): void; /** * Register an input with this datepicker. * @param input The datepicker input to register with this datepicker. */ _registerInput(input: MatDatepickerInput): void; /** Open the calendar. */ open(): void; reset(value?: D | null): void; /** Close the calendar. */ close(): void; /** Open the calendar as a dialog. */ private _openAsDialog; /** Open the calendar as a popup. */ private _openAsPopup; /** Create the popup. */ private _createPopup; /** Create the popup PositionStrategy. */ private _createPopupPositionStrategy; /** * @param obj The object to check. * @returns The given object if it is both a date instance and valid, otherwise null. */ private _getValidDateOrNull; static ɵfac: i0.ɵɵFactoryDeclaration, [null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration, "mat-datepicker", ["matDatepicker"], { "startAt": "startAt"; "type": "type"; "startView": "startView"; "clockStep": "clockStep"; "twelveHour": "twelveHour"; "color": "color"; "touchUi": "touchUi"; "disabled": "disabled"; "matDatepicker": "matDatepicker"; "panelClass": "panelClass"; "opened": "opened"; }, { "openedStream": "opened"; "closedStream": "closed"; }, never, never, false>; } //# sourceMappingURL=datepicker.d.ts.map