From 64b98caac916d13bd80356306a39699181784788 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <209825114+claude[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 07:13:12 +0000 Subject: [PATCH] fix: cap year at 4 digits and prevent crash on invalid datetime input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add max="9999-12-31[T23:59]" to datetime-local inputs so years cannot exceed 4 digits. - Drop the redundant `format(localValue, formatStr)` call in the render path — `localValue` is already the formatted string from the effect, and re-formatting a raw user string with an out-of-range year threw `RangeError: Invalid time value` mid-render, which the global error boundary caught as a page crash. Fixes #3640 Co-authored-by: aseckin <3686968+aseckin@users.noreply.github.com> --- front_end/src/components/ui/datetime_utc.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/front_end/src/components/ui/datetime_utc.tsx b/front_end/src/components/ui/datetime_utc.tsx index bfca108e5e..7fce4f16c2 100644 --- a/front_end/src/components/ui/datetime_utc.tsx +++ b/front_end/src/components/ui/datetime_utc.tsx @@ -83,7 +83,8 @@ const DatetimeUtc = forwardRef(