UNPKG

4.56 kBTypeScriptView Raw
1import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, ViewContainerRef } from '@angular/core';
2import { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';
3import { BehaviorSubject, Observable, Subject, Subscription } from 'rxjs';
4import { BsDatepickerConfig } from './bs-datepicker.config';
5import { BsDatepickerViewMode, DatepickerDateCustomClasses, DatepickerDateTooltipText } from './models';
6import * as i0 from "@angular/core";
7export declare class BsDatepickerDirective implements OnInit, OnDestroy, OnChanges, AfterViewInit {
8 _config: BsDatepickerConfig;
9 private _elementRef;
10 private _renderer;
11 /**
12 * Placement of a datepicker. Accepts: "top", "bottom", "left", "right"
13 */
14 placement: 'top' | 'bottom' | 'left' | 'right';
15 /**
16 * Specifies events that should trigger. Supports a space separated list of
17 * event names.
18 */
19 triggers: string;
20 /**
21 * Close datepicker on outside click
22 */
23 outsideClick: boolean;
24 /**
25 * A selector specifying the element the datepicker should be appended to.
26 */
27 container: string;
28 outsideEsc: boolean;
29 /**
30 * Emits an event when the datepicker is shown
31 */
32 onShown: EventEmitter<unknown>;
33 /**
34 * Emits an event when the datepicker is hidden
35 */
36 onHidden: EventEmitter<unknown>;
37 isOpen$: BehaviorSubject<boolean>;
38 isDestroy$: Subject<unknown>;
39 /**
40 * Indicates whether datepicker's content is enabled or not
41 */
42 isDisabled: boolean;
43 /**
44 * Minimum date which is available for selection
45 */
46 minDate?: Date;
47 /**
48 * Maximum date which is available for selection
49 */
50 maxDate?: Date;
51 /**
52 * Minimum view mode : day, month, or year
53 */
54 minMode?: BsDatepickerViewMode;
55 /**
56 * Disable Certain days in the week
57 */
58 daysDisabled?: number[];
59 /**
60 * Disable specific dates
61 */
62 datesDisabled?: Date[];
63 /**
64 * Enable specific dates
65 */
66 datesEnabled?: Date[];
67 /**
68 * Date custom classes
69 */
70 dateCustomClasses?: DatepickerDateCustomClasses[];
71 /**
72 * Date tooltip text
73 */
74 dateTooltipTexts?: DatepickerDateTooltipText[];
75 /**
76 * Emits when datepicker value has been changed
77 */
78 bsValueChange: EventEmitter<Date>;
79 protected _subs: Subscription[];
80 private _datepicker;
81 private _datepickerRef?;
82 private readonly _dateInputFormat$;
83 constructor(_config: BsDatepickerConfig, _elementRef: ElementRef, _renderer: Renderer2, _viewContainerRef: ViewContainerRef, cis: ComponentLoaderFactory);
84 /**
85 * Returns whether or not the datepicker is currently being shown
86 */
87 get isOpen(): boolean;
88 set isOpen(value: boolean);
89 _bsValue?: Date;
90 /**
91 * Initial value of datepicker
92 */
93 set bsValue(value: Date | undefined);
94 get dateInputFormat$(): Observable<string | undefined>;
95 /**
96 * Config object for datepicker
97 */
98 bsConfig?: Partial<BsDatepickerConfig>;
99 ngOnInit(): void;
100 ngOnChanges(changes: SimpleChanges): void;
101 initSubscribes(): void;
102 ngAfterViewInit(): void;
103 /**
104 * Opens an element’s datepicker. This is considered a “manual” triggering of
105 * the datepicker.
106 */
107 show(): void;
108 /**
109 * Closes an element’s datepicker. This is considered a “manual” triggering of
110 * the datepicker.
111 */
112 hide(): void;
113 /**
114 * Toggles an element’s datepicker. This is considered a “manual” triggering
115 * of the datepicker.
116 */
117 toggle(): void;
118 /**
119 * Set config for datepicker
120 */
121 setConfig(): void;
122 unsubscribeSubscriptions(): void;
123 ngOnDestroy(): void;
124 static ɵfac: i0.ɵɵFactoryDeclaration<BsDatepickerDirective, never>;
125 static ɵdir: i0.ɵɵDirectiveDeclaration<BsDatepickerDirective, "[bsDatepicker]", ["bsDatepicker"], { "placement": "placement"; "triggers": "triggers"; "outsideClick": "outsideClick"; "container": "container"; "outsideEsc": "outsideEsc"; "isDisabled": "isDisabled"; "minDate": "minDate"; "maxDate": "maxDate"; "minMode": "minMode"; "daysDisabled": "daysDisabled"; "datesDisabled": "datesDisabled"; "datesEnabled": "datesEnabled"; "dateCustomClasses": "dateCustomClasses"; "dateTooltipTexts": "dateTooltipTexts"; "isOpen": "isOpen"; "bsValue": "bsValue"; "bsConfig": "bsConfig"; }, { "onShown": "onShown"; "onHidden": "onHidden"; "bsValueChange": "bsValueChange"; }, never, never, false>;
126}