From 7cbff7acb688c933511089a591a6f168a30d9c86 Mon Sep 17 00:00:00 2001 From: Svetla Boykova Date: Wed, 20 Feb 2019 18:02:37 +0200 Subject: [PATCH 1/3] fix(date-picker): Fixed import and hide function #3034 --- .../src/lib/date-picker/date-picker.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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..79b2ca06347 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,7 @@ export class IgxDatePickerComponent implements IDatePicker, ControlValueAccessor *@hidden */ public ngOnDestroy(): void { - this._overlayService.hideAll(); + this._overlayService.hide(this._componentID); this._destroy$.next(true); this._destroy$.complete(); } From 894cfcc3e9f51cbad3f44cf88a1e9dca03f8597a Mon Sep 17 00:00:00 2001 From: Svetla Boykova Date: Wed, 20 Feb 2019 18:13:59 +0200 Subject: [PATCH 2/3] fix(date-picker): Fixes in date picker #3034 --- .../src/lib/date-picker/date-picker.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 79b2ca06347..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 @@ -806,7 +806,9 @@ export class IgxDatePickerComponent implements IDatePicker, ControlValueAccessor *@hidden */ public ngOnDestroy(): void { - this._overlayService.hide(this._componentID); + 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()) { From 63ae0247f201b212e883d48da62e036bcca49320 Mon Sep 17 00:00:00 2001 From: Svetla Boykova Date: Wed, 20 Feb 2019 18:32:54 +0200 Subject: [PATCH 3/3] fix(date-picker): Fixed Circular dependency detected #3034 --- .../src/lib/date-picker/calendar-container.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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