ng19-date-picker
Version:
https://github.com/vlio20/angular-datepicker
79 lines (78 loc) • 3.92 kB
TypeScript
import { ECalendarValue } from '../common/types/calendar-value-enum';
import { ChangeDetectorRef, EventEmitter, OnChanges, OnInit, SimpleChange, SimpleChanges } from '@angular/core';
import { IMonth } from './month.model';
import { MonthCalendarService } from './month-calendar.service';
import { IMonthCalendarConfig, IMonthCalendarConfigInternal } from './month-calendar-config';
import { ControlValueAccessor, UntypedFormControl, ValidationErrors, Validator } from '@angular/forms';
import { CalendarValue } from '../common/types/calendar-value';
import { UtilsService } from '../common/services/utils/utils.service';
import { DateValidator } from '../common/types/validator.type';
import { SingleCalendarValue } from '../common/types/single-calendar-value';
import { INavEvent } from '../common/models/navigation-event.model';
import { Dayjs } from 'dayjs';
import * as i0 from "@angular/core";
export declare class MonthCalendarComponent implements OnInit, OnChanges, ControlValueAccessor, Validator {
readonly monthCalendarService: MonthCalendarService;
readonly utilsService: UtilsService;
readonly cd: ChangeDetectorRef;
config: IMonthCalendarConfig;
displayDate: Dayjs | string;
minDate: Dayjs;
maxDate: Dayjs;
theme: string;
onSelect: EventEmitter<IMonth>;
onNavHeaderBtnClick: EventEmitter<null>;
onGoToCurrent: EventEmitter<void>;
onLeftNav: EventEmitter<INavEvent>;
onRightNav: EventEmitter<INavEvent>;
onLeftSecondaryNav: EventEmitter<INavEvent>;
onRightSecondaryNav: EventEmitter<INavEvent>;
isInited: boolean;
componentConfig: IMonthCalendarConfigInternal;
yearMonths: IMonth[][];
inputValue: CalendarValue;
inputValueType: ECalendarValue;
validateFn: DateValidator;
_shouldShowCurrent: boolean;
navLabel: string;
showLeftNav: boolean;
showRightNav: boolean;
showSecondaryLeftNav: boolean;
showSecondaryRightNav: boolean;
api: {
toggleCalendar: any;
moveCalendarTo: any;
};
constructor(monthCalendarService: MonthCalendarService, utilsService: UtilsService, cd: ChangeDetectorRef);
_selected: Dayjs[];
get selected(): Dayjs[];
set selected(selected: Dayjs[]);
_currentDateView: Dayjs;
get currentDateView(): Dayjs;
set currentDateView(current: Dayjs);
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
init(): void;
writeValue(value: CalendarValue): void;
registerOnChange(fn: any): void;
onChangeCallback(_: any): void;
registerOnTouched(fn: any): void;
validate(formControl: UntypedFormControl): ValidationErrors | any;
processOnChangeCallback(value: Dayjs[]): CalendarValue;
initValidators(): void;
monthClicked(month: IMonth): void;
onLeftNavClick(): void;
onLeftSecondaryNavClick(): void;
onRightNavClick(): void;
onRightSecondaryNavClick(): void;
toggleCalendarMode(): void;
getMonthBtnCssClass(month: IMonth): {
[klass: string]: boolean;
};
shouldShowCurrent(): boolean;
goToCurrent(): void;
moveCalendarTo(to: SingleCalendarValue): void;
handleConfigChange(config: SimpleChange): void;
static ɵfac: i0.ɵɵFactoryDeclaration<MonthCalendarComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<MonthCalendarComponent, "dp-month-calendar", never, { "config": { "alias": "config"; "required": false; }; "displayDate": { "alias": "displayDate"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; }, { "onSelect": "onSelect"; "onNavHeaderBtnClick": "onNavHeaderBtnClick"; "onGoToCurrent": "onGoToCurrent"; "onLeftNav": "onLeftNav"; "onRightNav": "onRightNav"; "onLeftSecondaryNav": "onLeftSecondaryNav"; "onRightSecondaryNav": "onRightSecondaryNav"; }, never, never, false, never>;
}