- Updated script 14/08/2025
- Below….
New helper: isPastCutoffNowFor(date) — prevents selecting today after 16:00 even if the UI hasn’t re-rendered.
New helper: scheduleCutoffRefresh() — automatically re-renders the calendar at exactly 16:00 so today becomes visibly unavailable.
Also refreshes when the tab becomes visible again (so if they come back after 16:00, UI updates).