diff --git a/lib/public/components/common/form/inputs/DateTimeInputModel.js b/lib/public/components/common/form/inputs/DateTimeInputModel.js index 2aec85f59f..7efb31ffad 100644 --- a/lib/public/components/common/form/inputs/DateTimeInputModel.js +++ b/lib/public/components/common/form/inputs/DateTimeInputModel.js @@ -65,13 +65,15 @@ export class DateTimeInputModel extends Observable { */ update(raw) { this._raw = raw; + const hasDateAndTime = raw.date && raw.time; + try { - this._value = raw.date && raw.time ? extractTimestampFromDateTimeInput(raw, { seconds: this._seconds }) : null; + this._value = hasDateAndTime ? extractTimestampFromDateTimeInput(raw, { seconds: this._seconds }) : null; } catch { this._value = null; } - this.notify(); + hasDateAndTime && this.notify(); } /**