UNPKG

2.31 kBTypeScriptView Raw
1import { OnInit } from '@angular/core';
2import { ControlValueAccessor } from '@angular/forms';
3import { TimepickerConfig } from './timepicker.config';
4export declare const TIMEPICKER_CONTROL_VALUE_ACCESSOR: any;
5export declare class TimepickerComponent implements ControlValueAccessor, OnInit {
6 /** hours change step */
7 hourStep: number;
8 /** hours change step */
9 minuteStep: number;
10 /** if true hours and minutes fields will be readonly */
11 readonlyInput: boolean;
12 /** if true scroll inside hours and minutes inputs will change time */
13 mousewheel: boolean;
14 /** if true up/down arrowkeys inside hours and minutes inputs will change time */
15 arrowkeys: boolean;
16 /** if true spinner arrows above and below the inputs will be shown */
17 showSpinners: boolean;
18 /** minimum time user can select */
19 min: Date;
20 /** maximum time user can select */
21 max: Date;
22 /** meridian labels based on locale */
23 meridians: string[];
24 /** if true works in 12H mode and displays AM/PM. If false works in 24H mode and hides AM/PM */
25 showMeridian: boolean;
26 onChange: any;
27 onTouched: any;
28 hours: string;
29 minutes: string;
30 invalidHours: any;
31 invalidMinutes: any;
32 meridian: any;
33 protected _selected: Date;
34 protected _showMeridian: boolean;
35 protected selected: Date;
36 protected config: TimepickerConfig;
37 constructor(_config: TimepickerConfig);
38 ngOnInit(): void;
39 writeValue(v: any): void;
40 registerOnChange(fn: (_: any) => {}): void;
41 registerOnTouched(fn: () => {}): void;
42 setDisabledState(isDisabled: boolean): void;
43 updateHours(): void;
44 hoursOnBlur(): void;
45 updateMinutes(): void;
46 minutesOnBlur(): void;
47 incrementHours(): void;
48 decrementHours(): void;
49 incrementMinutes(): void;
50 decrementMinutes(): void;
51 noIncrementHours(): boolean;
52 noDecrementHours(): boolean;
53 noIncrementMinutes(): boolean;
54 noDecrementMinutes(): boolean;
55 toggleMeridian(): void;
56 noToggleMeridian(): boolean;
57 protected refresh(): void;
58 protected updateTemplate(): void;
59 protected getHoursFromTemplate(): number;
60 protected getMinutesFromTemplate(): number;
61 protected pad(value: string | number): string;
62 protected addMinutesToSelected(minutes: any): void;
63}