You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Request]: relative date bounds for forms date and datetime-local fields #705
ai-firstReduces friction for AI agents authoring URLCode projectsenhancementNew feature or requestextensionInvolves an extension or companion package (store, ui, auth, admin)
Split out of #528 so it can close. Absolute minimum/maximum bounds for type: date and type: datetime-local fields shipped in #697, and conditional required fields (requiredWhen) are closing #528. The remaining part of the original benchmark evidence (test5/form-lab) was a start date constrained to "today through two years ahead": relative bounds. Today the author must hand-write that comparison in an onSubmit hook (if (parsedDate < today || parsedDate > twoYearsFromToday) ...), duplicating field extraction and the 422 error map.
Proposed behavior and alternatives
A bounded, declarative relative bound, for example minimum: today or an offset such as maximum: {from: today, add: P2Y}, resolved per request on the server and rendered as the HTML min/max of the served page.
Questions to decide before implementing (unverified; nothing here is designed yet):
Which clock and timezone define "today": the server's UTC date, an operator-configured zone, or a declared per-flow zone? The browser's local date can differ from the server's near midnight, so the rendered min/max and the server check may disagree for a submitter in another zone.
Rendered bounds go stale when a page is held open across midnight; the server check must remain authoritative.
Portability: the same result on node, aws and vercel.
The offset vocabulary should stay small (days/months/years), with no arbitrary expressions.
Until then relative bounds stay in onSubmit, as the forms README says.
Clock: "today" is the current date in a time zone declared on the form flow (an IANA name such as Europe/London). If none is declared, it is UTC. It must not depend on the host's local zone, so the same YAML behaves the same on node, aws and vercel.
Vocabulary:today plus a signed offset in days, months or years only (e.g. today, {from: today, add: P2Y}, {from: today, add: -P18Y}). No hours or minutes and no expressions.
The server check is authoritative and resolved per request. The rendered HTML min/max are a convenience and may go stale if a page stays open across midnight.
ai-firstReduces friction for AI agents authoring URLCode projectsenhancementNew feature or requestextensionInvolves an extension or companion package (store, ui, auth, admin)
Activity
feat(forms): conditional required fields with requiredWhen (#528) (#707)
jimhoyd commentedon Sep 25, 2026
Decision (owner, 2026-09-25):
Europe/London). If none is declared, it is UTC. It must not depend on the host's local zone, so the same YAML behaves the same on node, aws and vercel.todayplus a signed offset in days, months or years only (e.g.today,{from: today, add: P2Y},{from: today, add: -P18Y}). No hours or minutes and no expressions.min/maxare a convenience and may go stale if a page stays open across midnight.Ready to implement. Removing
needs-decision.Generated by Claude Code
feat: per-key quota, relative form date bounds, store-owned CRUD scre…