From 16a558a0ba921d630762712ba66c54d20912a6c3 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 --- Open-ILS/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 66d363af15..ba41a789a6 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 @@ -129,6 +129,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.11.0