From 74fc3ccf9b0096481928ab76f531f541a0bdd76a Mon Sep 17 00:00:00 2001 From: Hristo Popov Date: Thu, 22 Nov 2018 10:20:41 +0200 Subject: [PATCH] Prevenitng redundant method calls on value property when initialized with an empty string(master) (#3042) * fix(date-picker): Prevenitng redundant method calls on value. #3021 * fix(date-picker): Changing the check for value property on selection. #3021 --- .../src/lib/date-picker/date-picker.component.ts | 2 +- 1 file changed, 1 insertion(+), 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 7e0182bdf3b..d2b8770aab9 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 @@ -599,7 +599,7 @@ export class IgxDatePickerComponent implements ControlValueAccessor, EditorProvi * @hidden */ public handleSelection(date: Date) { - if (this.value !== null && this.value !== undefined) { + if (this.value) { date.setHours(this.value.getHours()); date.setMinutes(this.value.getMinutes()); date.setSeconds(this.value.getSeconds());