UNPKG

ng2-datepicker

Version:

ng2-datepicker is simple and minimal Angular datepicker component. It is fully customizable.

66 lines (65 loc) 1.94 kB
import { OnInit, OnChanges, SimpleChanges, ElementRef, EventEmitter, OnDestroy, ChangeDetectorRef } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { ISlimScrollEvent, SlimScrollOptions } from 'ngx-slimscroll'; import { DatepickerOptions } from './datepicker-options.interface'; import { Subscription } from 'rxjs'; interface Day { date: Date; day: number; month: number; year: number; inThisMonth: boolean; isToday: boolean; isSelected: boolean; isSelectable: boolean; } export declare class DatepickerComponent implements ControlValueAccessor, OnInit, OnChanges, OnDestroy { elementRef: ElementRef; private ref; options: DatepickerOptions; scrollOptions: SlimScrollOptions; isOpened: boolean; innerValue: Date; displayValue: string; view: 'days' | 'years'; date: Date; years: { year: number; isThisYear: boolean; }[]; days: Day[]; dayNames: string[]; scrollEvents: EventEmitter<ISlimScrollEvent>; sub: Subscription; private doc?; get value(): Date; set value(val: Date); constructor(elementRef: ElementRef, ref: ChangeDetectorRef, document?: any); get title(): string; private get scrollBarOptions(); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; toggle(): void; toggleView(): void; nextMonth(): void; prevMonth(): void; nextYear(): void; prevYear(): void; setDate(i: number): void; setYear(i: number): void; private scrollToYear; private init; private initDays; private initYears; private initDayNames; private generateDay; private isDateSelectable; writeValue(val: Date): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; private onTouchedCallback; private onChangeCallback; onBlur(e: MouseEvent): void; } export {};