From 74b504abb8a55f161608cd93221abf8d84506e39 Mon Sep 17 00:00:00 2001 From: NarrowsProjects Date: Mon, 13 Apr 2026 12:00:56 +0200 Subject: [PATCH 1/2] 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(); } /** From 84141e836ec2c3d9592e39a5ca4a5b0cbbf087ec Mon Sep 17 00:00:00 2001 From: "George R." Date: Tue, 16 Jun 2026 16:34:12 +0200 Subject: [PATCH 2/2] Potential fix for pull request finding 'Superfluous trailing arguments' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- lib/public/components/common/form/inputs/DateTimeInputModel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/public/components/common/form/inputs/DateTimeInputModel.js b/lib/public/components/common/form/inputs/DateTimeInputModel.js index b6ed7b7b5c..69456fd95d 100644 --- a/lib/public/components/common/form/inputs/DateTimeInputModel.js +++ b/lib/public/components/common/form/inputs/DateTimeInputModel.js @@ -68,7 +68,7 @@ export class DateTimeInputModel extends Observable { const hasDateAndTime = raw.date && raw.time; try { - this._value = hasDateAndTime ? extractTimestampFromDateTimeInput(raw, { seconds: this._seconds }) : null; + this._value = hasDateAndTime ? extractTimestampFromDateTimeInput(raw) : null; } catch { this._value = null; }