From 58237ecd28288f09f434a24c99d7e30ba1ade07d Mon Sep 17 00:00:00 2001 From: Kristian Robe Date: Thu, 19 May 2022 09:59:29 -0400 Subject: [PATCH] BH-75889 - Use correct comparison for dates in time picker input (#1304) Co-authored-by: kristian.robe --- .../src/elements/time-picker/TimePickerInput.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/novo-elements/src/elements/time-picker/TimePickerInput.ts b/projects/novo-elements/src/elements/time-picker/TimePickerInput.ts index 49ce0cd97..53b229e2c 100644 --- a/projects/novo-elements/src/elements/time-picker/TimePickerInput.ts +++ b/projects/novo-elements/src/elements/time-picker/TimePickerInput.ts @@ -171,7 +171,12 @@ export class NovoTimePickerInputElement implements OnInit, OnChanges, ControlVal } onComplete(dt) { - if (this.value !== dt) { + if (this.value instanceof Date && dt instanceof Date) { + if (this.value.getTime() !== dt.getTime()) { + this.dispatchOnChange(dt); + } + } + else if (this.value !== dt) { this.dispatchOnChange(dt); } }