@dhutaryan/ngx-mat-timepicker
Version:
Angular timepicker to add time which is based on material design and Angular material.
48 lines (47 loc) • 2.74 kB
TypeScript
import { ElementRef } from '@angular/core';
import { ValidatorFn } from '@angular/forms';
import { ThemePalette } from '@angular/material/core';
import { MatFormField } from '@angular/material/form-field';
import { TimeAdapter } from './adapter/time-adapter';
import { MatTimepickerInputBase } from './timepicker-input-base';
import { TimeSelectionModelChange } from './time-selection-model';
import { MatTimepickerControl, MatTimepickerPanel } from './timepicker-base';
import * as i0 from "@angular/core";
export declare const MAT_TIMEPICKER_VALUE_ACCESSOR: any;
export declare const MAT_TIMEPICKER_VALIDATORS: any;
/** Directive used to connect an input to a MatTimepicker. */
export declare class MatTimepickerInput<T> extends MatTimepickerInputBase<T | null, T> implements MatTimepickerControl<T | null> {
private _formField?;
/** The timepicker that this input is associated with. */
set matTimepicker(timepicker: MatTimepickerPanel<MatTimepickerControl<T>, T | null, T>);
_timepicker: MatTimepickerPanel<MatTimepickerControl<T>, T | null, T>;
/** The combined form control validator for this input. */
protected _validator: ValidatorFn | null;
/** The minimum valid date. */
get min(): T | null;
set min(value: T | null);
private _min;
/** The maximum valid date. */
get max(): T | null;
set max(value: T | null);
private _max;
constructor(elementRef: ElementRef<HTMLInputElement>, timeAdapter: TimeAdapter<T>, _formField?: MatFormField | undefined);
/**
* Gets the element that the timepicker popup should be connected to.
* @return The element to connect the popup to.
*/
getConnectedOverlayOrigin(): ElementRef;
/** Returns the palette used by the input's form field, if any. */
getThemePalette(): ThemePalette;
/** Gets the ID of an element that should be used a description for the timepicker overlay. */
getOverlayLabelId(): string | null;
/** Gets the input's minimum time. */
_getMinTime(): T | null;
/** Gets the input's maximum time. */
_getMaxTime(): T | null;
protected _assignValueToModel(value: T | null): void;
protected _getValueFromModel(modelValue: T | null): T | null;
protected _shouldHandleChangeEvent(event: TimeSelectionModelChange<T>): boolean;
static ɵfac: i0.ɵɵFactoryDeclaration<MatTimepickerInput<any>, [null, { optional: true; }, { optional: true; }]>;
static ɵdir: i0.ɵɵDirectiveDeclaration<MatTimepickerInput<any>, "input[matTimepicker]", ["matTimepickerInput"], { "matTimepicker": { "alias": "matTimepicker"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; }, {}, never, never, true, never>;
}