Skip to content

Commit

Permalink
fix(datepicker): fix error with destroy changes
Browse files Browse the repository at this point in the history
  • Loading branch information
abalad committed Nov 21, 2019
1 parent 8c1a0a6 commit b777990
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion projects/truly-ui/src/components/datepicker/datepicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export class TlDatePicker extends ValueAccessorBase<Date | string> implements On
}

onCompleteMask() {
setTimeout(() => {
const timeout = setTimeout(() => {
this.handleDateChange();
if (this.isoDate) {
this.value = this.getObjectValues().fullDate.toISOString();
Expand All @@ -246,6 +246,7 @@ export class TlDatePicker extends ValueAccessorBase<Date | string> implements On
}
this.changes.detectChanges();
this.completeMask.emit(this.getObjectValues());
clearTimeout(timeout);
}, 500);

}
Expand Down

0 comments on commit b777990

Please sign in to comment.