diff --git a/projects/igniteui-angular/src/lib/date-picker/calendar-container.component.ts b/projects/igniteui-angular/src/lib/date-picker/calendar-container.component.ts index e3d5f0a2abf..3ed7a82edc8 100644 --- a/projects/igniteui-angular/src/lib/date-picker/calendar-container.component.ts +++ b/projects/igniteui-angular/src/lib/date-picker/calendar-container.component.ts @@ -1,5 +1,6 @@ import { Component, ViewChild, Input, Output, EventEmitter, HostListener, HostBinding } from '@angular/core'; -import { DatePickerInteractionMode, IgxCalendarComponent } from 'igniteui-angular'; +import { DatePickerInteractionMode } from './date-picker.component'; +import { IgxCalendarComponent } from '../calendar'; /** * @hidden diff --git a/projects/igniteui-angular/src/lib/date-picker/date-picker.component.ts b/projects/igniteui-angular/src/lib/date-picker/date-picker.component.ts index 7043952a719..bddf4eccd50 100644 --- a/projects/igniteui-angular/src/lib/date-picker/date-picker.component.ts +++ b/projects/igniteui-angular/src/lib/date-picker/date-picker.component.ts @@ -37,7 +37,7 @@ import { HorizontalAlignment, PositionSettings, ConnectedPositioningStrategy -} from '../services'; +} from '../services/index'; import { DateRangeDescriptor } from '../core/dates/dateRange'; import { EditorProvider } from '../core/edit-provider'; import { IgxButtonModule } from '../directives/button/button.directive'; @@ -806,7 +806,9 @@ export class IgxDatePickerComponent implements IDatePicker, ControlValueAccessor *@hidden */ public ngOnDestroy(): void { - this._overlayService.hideAll(); + if (this._componentID) { + this._overlayService.hide(this._componentID); + } this._destroy$.next(true); this._destroy$.complete(); } @@ -1122,6 +1124,7 @@ export class IgxDatePickerComponent implements IDatePicker, ControlValueAccessor private _onClosed(): void { this.collapsed = true; + this._componentID = null; this.onClose.emit(this); if (this.getEditElement()) {