- Ya
- 14 Agosti 2026, 08:30 UTC
- Mwandishi
- kamo
- Ahadi ya
- 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.