Stop the event dialog throwing "Invalid time value" on open

Fixkamo-internal
Shipped
August 14, 2026 at 8:30 AM UTC
Author
kamo
Commit
0afbb81

wallClockToInstant called toISOString() on a date it had not checked, so any unreadable input threw RangeError instead of returning something unusable. The dialog initialises both datetime fields to the empty string and fills them from an effect, so the very first render of every event dialog asks it to read "" — and the throw took the dialog down before it could paint. Reported from the lead callback button, which mounts the dialog fresh on open; the calendar page mounts it unconditionally and was hitting the same fault. The code this replaced was accidentally safe: new Date("").getTime() is NaN, and every caller already guards on NaN. Both helpers now honour that contract deliberately — unreadable in, empty string out, never an exception. Saving is gated on the times being readable as well. rangeInvalid only catches an end before a start, so an empty or half-typed field produced no duration and passed it; a dialog with a pre-filled title, which is every callback, could then be submitted with a cleared date and post an empty instant for the service to reject.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing