Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
[required]="required"
(blur)="propagateTouch(); onDateEnter()"
[(ngModel)]="current"
+ (ngModelChange)="inputChanged($event)"
(keyup.enter)="onDateEnter()"
(dateSelect)="onDateSelect($event)"/>
<div class="input-group-append">
this.propagateChange(date);
}
+ // onDateSelect() is not called when the value is cleared.
+ // Handle that here.
+ inputChanged(value) {
+ if (value === null) {
+ this.onChangeAsDate.emit(null);
+ this.onChangeAsYmd.emit(null);
+ this.onChangeAsIso.emit(null);
+ this.propagateChange(null);
+ }
+ }
+
reset() {
this.current = {
year: null,