From 044b4de34589de84295ea9e17f397280843fdcf5 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 3 Nov 2020 15:03:23 -0500 Subject: [PATCH] LP1889128 clearable via model Allow users of to clear the selected value (set current = null) via updates to their ngModel variable. Signed-off-by: Bill Erickson Signed-off-by: Michele Morgan Signed-off-by: Jane Sandberg --- .../src/eg2/src/app/share/date-select/date-select.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Open-ILS/src/eg2/src/app/share/date-select/date-select.component.ts b/Open-ILS/src/eg2/src/app/share/date-select/date-select.component.ts index d855f6d4ea..b66a26188e 100644 --- a/Open-ILS/src/eg2/src/app/share/date-select/date-select.component.ts +++ b/Open-ILS/src/eg2/src/app/share/date-select/date-select.component.ts @@ -130,6 +130,9 @@ export class DateSelectComponent implements OnInit, ControlValueAccessor { month: value.getMonth() + 1, day: value.getDate() }; + } else { + // Allow the value to be cleared via model change. + this.current = null; } } -- 2.43.2