-
Notifications
You must be signed in to change notification settings - Fork 18
/
datePicker.d.ts
50 lines (50 loc) · 1.8 KB
/
datePicker.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { AbstractControl, ControlValueAccessor } from "@angular/forms";
import { ElementRef, OnInit } from "@angular/core";
import { Moment } from "moment";
import { OverlayService } from "angular-io-overlay";
import { MomentParseFunction, OnChangeHandler, OnTouchedHandler } from "./common";
export declare type ParserFunction = (value: any, parseFn: MomentParseFunction) => Moment;
export declare class DatePicker implements ControlValueAccessor, OnInit {
private overlayService;
private _value;
private _popupRef;
private parseValue;
datePickerContainer: ElementRef;
mode: "date" | "datetime" | "time";
displayDateMode: "day" | "month" | "year";
showClearButton: boolean;
format: string;
isMeridiem: boolean;
disabled: boolean;
align: any;
closeBySelection: boolean;
inputClass: string;
onChange: OnChangeHandler;
onTouched: OnTouchedHandler;
inputText: string;
constructor(overlayService: OverlayService);
ngOnInit(): void;
writeValue(value: string): void;
registerOnChange(fn: OnChangeHandler): void;
registerOnTouched(fn: OnTouchedHandler): void;
validate(c: AbstractControl): {
[key: string]: any;
};
/** Raises handers registered by ControlValueAccessor.registerOnChange method with converted value. */
raiseOnChange(value: string): void;
togglePopup(): void;
openPopup(): void;
closePopup(): void;
clear(): void;
getCSSClasses(): string;
readonly isUsingMeridiem: boolean;
/**
* Formats input value based on current input type.
* Value converted to local before formatting.
*/
private formatValue(value);
/** Format based on date picker current type. */
private readonly currentFormat;
private updateControlText(formattedValue);
private convertValue(value);
}