ngx-animating-datepicker
Version:
An Animating Datepicker for Angular 2+, for some smooth date picking :).
93 lines (92 loc) • 2.7 kB
TypeScript
import { ApplicationRef, ComponentFactoryResolver, EventEmitter, Injector, Renderer2, ViewContainerRef } from '@angular/core';
import { NgControl } from '@angular/forms';
import { Options } from '../../models/datepicker-options.model';
import { DirectiveOptions } from '../../models/directive-options.model';
export declare class DatepickerDirective {
viewContainerRef: ViewContainerRef;
componentFactoryResolver: ComponentFactoryResolver;
private appRef;
private injector;
private renderer;
formControl: NgControl;
datepicker: any;
clickListener: any;
_options: {
appendToBody: boolean;
openDirection: string;
closeOnBlur: boolean;
useAnimatePicker: boolean;
};
options: DirectiveOptions;
private _datepickerOptions;
datepickerOptions: Options;
/**
* Set the the language manualy. A string with a BCP 47 language tag
* @example nl-NL
*/
private _language;
language: string;
/**
* Minimal Date: If set the dates before it will be disabled
*/
private _minDate;
minDate: Date;
/**
* Maximal Date: If set the dates after it will be disabled
*/
private _maxDate;
maxDate: Date;
/**
* Number of months: the number of months displayed
*/
private _numberOfMonths;
numberOfMonths: any;
/**
* Theme string is added to the host
*/
private _theme;
theme: any;
/**
* The open state
*/
private _isOpen;
isOpen: any;
/**
* Selected Dates: handles the selected dates array. Can be set both internally and externally
*/
private _selectedDates;
selectedDatesChange: EventEmitter<{}>;
selectedDates: Date[];
onClick(): void;
constructor(viewContainerRef: ViewContainerRef, componentFactoryResolver: ComponentFactoryResolver, appRef: ApplicationRef, injector: Injector, renderer: Renderer2, formControl: NgControl);
/**
* Add selected changes
*/
subscribeToSelectedChanges(): void;
/**
* Set all the options and inputs of the datepicker
*/
setDatepickerOptionsAndInputs(): void;
/**
* Handles the (faked) blur event
*
* @param event
*/
onBlurHandler(event: Event): void;
/**
* Returns a create DatepickerComponent method
*/
createDatepicker(): any;
/**
* Sets the position of the datepicker
*/
setPosition(): void;
/**
* Appends the DatepickerComponent to the body and returns the instance
*/
appendToBody(): any;
/**
* Appends the DatepickerComponent to the container and returns the instance
*/
appendToContainer(): any;
}