ng2-date-picker-pda-forked
Version:
60 lines (59 loc) • 2.38 kB
TypeScript
import { ECalendarValue } from '../common/types/calendar-value-enum';
import { SingleCalendarValue } from '../common/types/single-calendar-value';
import { ECalendarMode } from '../common/types/calendar-mode-enum';
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
import { TimeSelectService, TimeUnit } from './time-select.service';
import { Moment } from 'moment';
import { ITimeSelectConfig } from './time-select-config.model';
import { ControlValueAccessor, FormControl, ValidationErrors, Validator } from '@angular/forms';
import { CalendarValue } from '../common/types/calendar-value';
import { UtilsService } from '../common/services/utils/utils.service';
import { IDate } from '../common/models/date.model';
export declare class TimeSelectComponent implements OnInit, OnChanges, ControlValueAccessor, Validator {
timeSelectService: TimeSelectService;
utilsService: UtilsService;
config: ITimeSelectConfig;
displayDate: SingleCalendarValue;
minDate: Moment | string;
maxDate: Moment | string;
minTime: Moment | string;
maxTime: Moment | string;
theme: string;
onChange: EventEmitter<IDate>;
CalendarType: typeof ECalendarMode;
isInited: boolean;
componentConfig: ITimeSelectConfig;
_selected: Moment;
inputValue: CalendarValue;
inputValueType: ECalendarValue;
validateFn: (inputVal: CalendarValue) => {
[key: string]: any;
};
hours: string;
minutes: string;
seconds: string;
meridiem: string;
selected: Moment;
api: {
triggerChange: any;
};
constructor(timeSelectService: TimeSelectService, utilsService: UtilsService);
ngOnInit(): void;
init(): void;
ngOnChanges(changes: SimpleChanges): void;
writeValue(value: CalendarValue): void;
registerOnChange(fn: any): void;
onChangeCallback(_: any): void;
registerOnTouched(fn: any): void;
validate(formControl: FormControl): ValidationErrors | any;
processOnChangeCallback(value: Moment): CalendarValue;
initValidators(): void;
decrease(unit: TimeUnit): void;
increase(unit: TimeUnit): void;
toggleMeridiem(): void;
emitChange(): void;
calculateTimeParts(time: Moment): void;
shouldShowDecrease(unit: TimeUnit): boolean;
shouldShowIncrease(unit: TimeUnit): boolean;
shouldShowToggleMeridiem(): boolean;
}