UNPKG

2.85 kBTypeScriptView Raw
1import { EventEmitter } from '@angular/core';
2import { ControlValueAccessor } from '@angular/forms';
3import { DatePickerInnerComponent } from './datepicker-inner.component';
4import { DatepickerConfig } from './datepicker.config';
5export declare const DATEPICKER_CONTROL_VALUE_ACCESSOR: any;
6export declare class DatePickerComponent implements ControlValueAccessor {
7 /** sets datepicker mode, supports: `day`, `month`, `year` */
8 datepickerMode: string;
9 /** default date to show if `ng-model` value is not specified */
10 initDate: Date;
11 /** oldest selectable date */
12 minDate: Date;
13 /** latest selectable date */
14 maxDate: Date;
15 /** set lower datepicker mode, supports: `day`, `month`, `year` */
16 minMode: string;
17 /** sets upper datepicker mode, supports: `day`, `month`, `year` */
18 maxMode: string;
19 /** if false week numbers will be hidden */
20 showWeeks: boolean;
21 /** format of day in month */
22 formatDay: string;
23 /** format of month in year */
24 formatMonth: string;
25 /** format of year in year range */
26 formatYear: string;
27 /** format of day in week header */
28 formatDayHeader: string;
29 /** format of title when selecting day */
30 formatDayTitle: string;
31 /** format of title when selecting month */
32 formatMonthTitle: string;
33 /** starting day of the week from 0-6 (0=Sunday, ..., 6=Saturday) */
34 startingDay: number;
35 /** number of years displayed in year selection */
36 yearRange: number;
37 /** if true only dates from the currently displayed month will be shown */
38 onlyCurrentMonth: boolean;
39 /** if true shortcut`s event propagation will be disabled */
40 shortcutPropagation: boolean;
41 /** number of months displayed in a single row of month picker */
42 monthColLimit: number;
43 /** number of years displayed in a single row of year picker */
44 yearColLimit: number;
45 /** array of custom css classes to be applied to targeted dates */
46 customClass: {
47 date: Date;
48 mode: string;
49 clazz: string;
50 }[];
51 /** array of disabled dates */
52 dateDisabled: {
53 date: Date;
54 mode: string;
55 }[];
56 /** currently active date */
57 activeDate: Date;
58 selectionDone: EventEmitter<Date>;
59 /** callback to invoke when the activeDate is changed. */
60 activeDateChange: EventEmitter<Date>;
61 _datePicker: DatePickerInnerComponent;
62 onChange: any;
63 onTouched: any;
64 protected _now: Date;
65 protected _activeDate: Date;
66 protected config: DatepickerConfig;
67 constructor(config: DatepickerConfig);
68 configureOptions(): void;
69 onUpdate(event: any): void;
70 onSelectionDone(event: Date): void;
71 onActiveDateChange(event: Date): void;
72 writeValue(value: any): void;
73 registerOnChange(fn: (_: any) => {}): void;
74 registerOnTouched(fn: () => {}): void;
75}