diff --git a/src/Squidex/app/framework/angular/date-time-editor.component.ts b/src/Squidex/app/framework/angular/date-time-editor.component.ts index ad6103174..024d73b1d 100644 --- a/src/Squidex/app/framework/angular/date-time-editor.component.ts +++ b/src/Squidex/app/framework/angular/date-time-editor.component.ts @@ -191,19 +191,20 @@ export class DateTimeEditorComponent implements ControlValueAccessor, OnDestroy, } private updateControls() { - if (!this.dateValue) { - return; - } - this.suppressEvents = true; if (this.timeValue && this.timeValue.isValid()) { this.timeControl.setValue(this.timeValue.format('HH:mm:ss'), { emitEvent: false }); + } else { + this.timeControl.setValue(null, { emitEvent: false }); } + if (this.dateValue && this.dateValue.isValid() && this.picker) { this.dateControl.setValue(this.dateValue.format('YYYY-MM-DD'), { emitEvent: false }); this.picker.setMoment(this.dateValue); + } else { + this.dateControl.setValue(null, { emitEvent: false }); } this.suppressEvents = false;