From 74b504abb8a55f161608cd93221abf8d84506e39 Mon Sep 17 00:00:00 2001 From: NarrowsProjects Date: Mon, 13 Apr 2026 12:00:56 +0200 Subject: [PATCH] feat: only notify models if both time and date have been provided. --- .../components/common/form/inputs/DateTimeInputModel.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(); } /**