/** * @license * Copyright Google Inc. 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 { AfterContentInit, EventEmitter, InjectionToken, NgZone, OnDestroy, ViewContainerRef } from '@angular/core'; import { Overlay, RepositionScrollStrategy, // This import is only used to define a generic type. The current TypeScript version incorrectly ScrollStrategy } from '@angular/cdk/overlay'; import { Directionality } from '@angular/cdk/bidi'; import { MdDatepickerInput } from './datepicker-input'; import { MdCalendar } from './calendar'; import { DateAdapter, MatDialog } from '@angular/material'; /** Injection token that determines the scroll handling while the calendar is open. */ export declare const MD_DATEPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>; /** @docs-private */ export declare function MD_DATEPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => RepositionScrollStrategy; /** @docs-private */ export declare const MD_DATEPICKER_SCROLL_STRATEGY_PROVIDER: { provide: InjectionToken<() => ScrollStrategy>; deps: (typeof Overlay)[]; useFactory: typeof MD_DATEPICKER_SCROLL_STRATEGY_PROVIDER_FACTORY; }; /** * Component used as the content for the datepicker dialog and popup. We use this instead of using * MdCalendar 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 MdDatepickerContent implements AfterContentInit { datepicker: MdDatepicker; _calendar: MdCalendar; ngAfterContentInit(): void; /** * Handles keydown event on datepicker content. * @param event The event. */ _handleKeydown(event: KeyboardEvent): void; } /** Component responsible for managing the datepicker popup/dialog. */ export declare class MdDatepicker implements OnDestroy { private _dialog; private _overlay; private _ngZone; private _viewContainerRef; private _scrollStrategy; _dateAdapter: DateAdapter; private _dir; private _document; /** The currently selected date. */ subed: D | null; /** The date to open the calendar to initially. */ startAt: D | null; private _startAt; /** The view that the calendar should start in. */ startView: 'month' | 'year'; type: 'normal' | 'wide'; /** * 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. */ touchUi: boolean; /** Whether the datepicker pop-up should be disabled. */ disabled: any; private _disabled; /** * Emits new selected date when selected date changes. * @deprecated Switch to the `dateChange` and `dateInput` binding on the input element. */ selectedChanged: EventEmitter; /** Whether the calendar is open. */ opened: boolean; /** The id for the datepicker calendar. */ id: string; /** The currently selected date. */ _selected: D | null; private _validSelected; private _validSubed; /** The minimum selectable date. */ readonly _minDate: D | null; /** The maximum selectable date. */ readonly _maxDate: D | null; readonly _dateFilter: (date: D | null) => boolean; /** A reference to the overlay when the calendar is opened as a popup. */ private _popupRef; /** 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; /** The input element this datepicker is associated with. */ private _datepickerInput; /** The element that was focused before the datepicker was opened. */ private _focusedElementBeforeOpen; private _inputSubscription; adapter: any; constructor(_dialog: MatDialog, _overlay: Overlay, _ngZone: NgZone, _viewContainerRef: ViewContainerRef, _scrollStrategy: any, _dateAdapter: DateAdapter, _dir: Directionality, _document: any); 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: MdDatepickerInput): void; /** Open the calendar. */ open(): 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; }