UNPKG

ngx-jalali-date-picker

Version:

This is a configurable date-picker build for Angular applications. Supports latest (Angular 18) version. This date-picker is based on ng2-date-piker and ngx-jalali-date-picker date pickers.

80 lines (79 loc) 3.94 kB
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 { Moment } from 'jalali-moment'; import { IMonthCalendarConfig, IMonthCalendarConfigInternal } from './month-calendar-config'; import { ControlValueAccessor, FormControl, 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 * 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: Moment; minDate: Moment; maxDate: Moment; 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; _selected: Moment[]; yearMonths: IMonth[][]; _currentDateView: Moment; inputValue: CalendarValue; inputValueType: ECalendarValue; validateFn: DateValidator; _shouldShowCurrent: boolean; navLabel: string; showLeftNav: boolean; showRightNav: boolean; showSecondaryLeftNav: boolean; showSecondaryRightNav: boolean; api: { toggleCalendar: any; moveCalendarTo: any; }; set selected(selected: Moment[]); get selected(): Moment[]; set currentDateView(current: Moment); get currentDateView(): Moment; constructor(monthCalendarService: MonthCalendarService, utilsService: UtilsService, cd: ChangeDetectorRef); 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: FormControl): ValidationErrors | any; isFarsi(): boolean; processOnChangeCallback(value: Moment[]): 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>; }