[6a3a178] | 1 | /**
|
---|
| 2 | * @license
|
---|
| 3 | * Copyright Google LLC All Rights Reserved.
|
---|
| 4 | *
|
---|
| 5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
| 6 | * found in the LICENSE file at https://angular.io/license
|
---|
| 7 | */
|
---|
| 8 | import { ElementRef, OnDestroy } from '@angular/core';
|
---|
| 9 | import { ValidatorFn } from '@angular/forms';
|
---|
| 10 | import { DateAdapter, MatDateFormats, ThemePalette } from '@angular/material/core';
|
---|
| 11 | import { MatFormField } from '@angular/material/form-field';
|
---|
| 12 | import { MatDatepickerInputBase, DateFilterFn } from './datepicker-input-base';
|
---|
| 13 | import { MatDatepickerControl, MatDatepickerPanel } from './datepicker-base';
|
---|
| 14 | import { DateSelectionModelChange } from './date-selection-model';
|
---|
| 15 | /** @docs-private */
|
---|
| 16 | export declare const MAT_DATEPICKER_VALUE_ACCESSOR: any;
|
---|
| 17 | /** @docs-private */
|
---|
| 18 | export declare const MAT_DATEPICKER_VALIDATORS: any;
|
---|
| 19 | /** Directive used to connect an input to a MatDatepicker. */
|
---|
| 20 | export declare class MatDatepickerInput<D> extends MatDatepickerInputBase<D | null, D> implements MatDatepickerControl<D | null>, OnDestroy {
|
---|
| 21 | private _formField?;
|
---|
| 22 | private _closedSubscription;
|
---|
| 23 | /** The datepicker that this input is associated with. */
|
---|
| 24 | set matDatepicker(datepicker: MatDatepickerPanel<MatDatepickerControl<D>, D | null, D>);
|
---|
| 25 | _datepicker: MatDatepickerPanel<MatDatepickerControl<D>, D | null, D>;
|
---|
| 26 | /** The minimum valid date. */
|
---|
| 27 | get min(): D | null;
|
---|
| 28 | set min(value: D | null);
|
---|
| 29 | private _min;
|
---|
| 30 | /** The maximum valid date. */
|
---|
| 31 | get max(): D | null;
|
---|
| 32 | set max(value: D | null);
|
---|
| 33 | private _max;
|
---|
| 34 | /** Function that can be used to filter out dates within the datepicker. */
|
---|
| 35 | get dateFilter(): DateFilterFn<D | null>;
|
---|
| 36 | set dateFilter(value: DateFilterFn<D | null>);
|
---|
| 37 | private _dateFilter;
|
---|
| 38 | /** The combined form control validator for this input. */
|
---|
| 39 | protected _validator: ValidatorFn | null;
|
---|
| 40 | constructor(elementRef: ElementRef<HTMLInputElement>, dateAdapter: DateAdapter<D>, dateFormats: MatDateFormats, _formField?: MatFormField | undefined);
|
---|
| 41 | /**
|
---|
| 42 | * Gets the element that the datepicker popup should be connected to.
|
---|
| 43 | * @return The element to connect the popup to.
|
---|
| 44 | */
|
---|
| 45 | getConnectedOverlayOrigin(): ElementRef;
|
---|
| 46 | /** Gets the ID of an element that should be used a description for the calendar overlay. */
|
---|
| 47 | getOverlayLabelId(): string | null;
|
---|
| 48 | /** Returns the palette used by the input's form field, if any. */
|
---|
| 49 | getThemePalette(): ThemePalette;
|
---|
| 50 | /** Gets the value at which the calendar should start. */
|
---|
| 51 | getStartValue(): D | null;
|
---|
| 52 | ngOnDestroy(): void;
|
---|
| 53 | /** Opens the associated datepicker. */
|
---|
| 54 | protected _openPopup(): void;
|
---|
| 55 | protected _getValueFromModel(modelValue: D | null): D | null;
|
---|
| 56 | protected _assignValueToModel(value: D | null): void;
|
---|
| 57 | /** Gets the input's minimum date. */
|
---|
| 58 | _getMinDate(): D | null;
|
---|
| 59 | /** Gets the input's maximum date. */
|
---|
| 60 | _getMaxDate(): D | null;
|
---|
| 61 | /** Gets the input's date filtering function. */
|
---|
| 62 | protected _getDateFilter(): DateFilterFn<D | null>;
|
---|
| 63 | protected _shouldHandleChangeEvent(event: DateSelectionModelChange<D>): boolean;
|
---|
| 64 | }
|
---|