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 d7fe3b71e6a..a2d83187779 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 @@ -16,7 +16,8 @@ import { HostListener, ElementRef, TemplateRef, - Directive + Directive, + ChangeDetectorRef } from '@angular/core'; import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; import { @@ -444,7 +445,7 @@ export class IgxDatePickerComponent implements ControlValueAccessor, EditorProvi @ViewChild(IgxInputDirective) protected input: IgxInputDirective; - constructor(private resolver: ComponentFactoryResolver) { } + constructor(private resolver: ComponentFactoryResolver, private cdr: ChangeDetectorRef) { } /** *Method that sets the selected date. @@ -461,6 +462,7 @@ export class IgxDatePickerComponent implements ControlValueAccessor, EditorProvi */ public writeValue(value: Date) { this.value = value; + this.cdr.markForCheck(); } /** diff --git a/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts b/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts index ce4fadf6386..50aca440bc8 100644 --- a/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts +++ b/projects/igniteui-angular/src/lib/grids/filtering/grid-filtering-row.component.ts @@ -142,11 +142,6 @@ export class IgxGridFilteringRowComponent implements AfterViewInit { this._conditionsOverlaySettings.outlet = this.column.grid.outletDirective; this._operatorsOverlaySettings.outlet = this.column.grid.outletDirective; - if (this.column.dataType === DataType.Date) { - // TODO: revise usage of cdr.detectChanges() here - this.cdr.detectChanges(); - } - this.input.nativeElement.focus(); }