-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
bs-datepicker-inline-container.component.ts
38 lines (33 loc) · 1.43 KB
/
bs-datepicker-inline-container.component.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { Component, ElementRef, OnDestroy, OnInit, Renderer2 } from '@angular/core';
import { BsDatepickerContainerComponent } from './bs-datepicker-container.component';
import { BsDatepickerConfig } from '../../bs-datepicker.config';
import { BsDatepickerActions } from '../../reducer/bs-datepicker.actions';
import { BsDatepickerEffects } from '../../reducer/bs-datepicker.effects';
import { BsDatepickerStore } from '../../reducer/bs-datepicker.store';
import { PositioningService } from 'ngx-bootstrap/positioning';
import { datepickerAnimation } from '../../datepicker-animations';
@Component({
selector: 'bs-datepicker-inline-container',
providers: [BsDatepickerStore, BsDatepickerEffects],
templateUrl: './bs-datepicker-view.html',
host: {
'(click)': '_stopPropagation($event)'
},
animations: [datepickerAnimation]
})
export class BsDatepickerInlineContainerComponent extends BsDatepickerContainerComponent
implements OnInit, OnDestroy {
constructor(
_renderer: Renderer2,
_config: BsDatepickerConfig,
_store: BsDatepickerStore,
_element: ElementRef,
_actions: BsDatepickerActions,
_effects: BsDatepickerEffects,
_positioningService: PositioningService
) {
super(_renderer, _config, _store, _element, _actions, _effects, _positioningService);
_renderer.setStyle(_element.nativeElement, 'display', 'inline-block');
_renderer.setStyle(_element.nativeElement, 'position', 'static');
}
}