ng2-date-picker-pda-forked
Version:
98 lines (97 loc) • 4.19 kB
TypeScript
import { IDate } from '../common/models/date.model';
import { DomHelper } from '../common/services/dom-appender/dom-appender.service';
import { UtilsService } from '../common/services/utils/utils.service';
import { CalendarMode } from '../common/types/calendar-mode';
import { CalendarValue } from '../common/types/calendar-value';
import { ECalendarValue } from '../common/types/calendar-value-enum';
import { SingleCalendarValue } from '../common/types/single-calendar-value';
import { IDayCalendarConfig } from '../day-calendar/day-calendar-config.model';
import { DayCalendarComponent } from '../day-calendar/day-calendar.component';
import { IDayTimeCalendarConfig } from '../day-time-calendar/day-time-calendar-config.model';
import { ITimeSelectConfig } from '../time-select/time-select-config.model';
import { TimeSelectComponent } from '../time-select/time-select.component';
import { IDatePickerConfig } from './date-picker-config.model';
import { IDpDayPickerApi } from './date-picker.api';
import { DatePickerService } from './date-picker.service';
import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, Renderer, SimpleChanges } from '@angular/core';
import { ControlValueAccessor, FormControl, ValidationErrors, Validator } from '@angular/forms';
import { Moment, unitOfTime } from 'moment';
export declare class DatePickerComponent implements OnChanges, OnInit, AfterViewInit, ControlValueAccessor, Validator, OnDestroy {
private dayPickerService;
private domHelper;
private elemRef;
private renderer;
private utilsService;
isInitialized: boolean;
config: IDatePickerConfig;
mode: CalendarMode;
placeholder: string;
disabled: boolean;
displayDate: SingleCalendarValue;
theme: string;
minDate: Moment | string;
maxDate: Moment | string;
minTime: Moment | string;
maxTime: Moment | string;
open: EventEmitter<void>;
close: EventEmitter<void>;
calendarContainer: ElementRef;
dayCalendarRef: DayCalendarComponent;
monthCalendarRef: DayCalendarComponent;
timeSelectRef: TimeSelectComponent;
componentConfig: IDatePickerConfig;
dayCalendarConfig: IDayCalendarConfig;
dayTimeCalendarConfig: IDayTimeCalendarConfig;
timeSelectConfig: ITimeSelectConfig;
_areCalendarsShown: boolean;
hideStateHelper: boolean;
_selected: Moment[];
inputValue: CalendarValue;
inputValueType: ECalendarValue;
isFocusedTrigger: boolean;
currentDateView: Moment;
inputElementValue: string;
calendarWrapper: HTMLElement;
appendToElement: HTMLElement;
inputElementContainer: HTMLElement;
popupElem: HTMLElement;
handleInnerElementClickUnlisteners: Function[];
globalListnersUnlisteners: Function[];
validateFn: (inputVal: CalendarValue) => {
[key: string]: any;
};
api: IDpDayPickerApi;
selected: Moment[];
areCalendarsShown: boolean;
constructor(dayPickerService: DatePickerService, domHelper: DomHelper, elemRef: ElementRef, renderer: Renderer, utilsService: UtilsService);
onClick(): void;
onBodyClick(): void;
onScroll(): void;
writeValue(value: CalendarValue): void;
registerOnChange(fn: any): void;
onChangeCallback(_: any): void;
registerOnTouched(fn: any): void;
validate(formControl: FormControl): ValidationErrors | any;
processOnChangeCallback(selected: Moment[]): CalendarValue;
initValidators(): void;
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
ngAfterViewInit(): void;
setDisabledState(isDisabled: boolean): void;
setElementPositionInDom(): void;
setInputElementContainer(): void;
handleInnerElementClick(element: HTMLElement): void;
init(): void;
inputFocused(): void;
showCalendars(): void;
hideCalendar(): void;
onViewDateChange(value: string): void;
shouldShowGoToCurrent(): boolean;
moveToCurrent(): void;
dateSelected(date: IDate, granularity: unitOfTime.Base, ignoreClose?: boolean): void;
onDateClick(): void;
onKeyPress(event: KeyboardEvent): void;
startGlobalListeners(): void;
stopGlobalListeners(): void;
ngOnDestroy(): void;
}