io.input.date
A day on the calendar, no time attached.
io.input.date asks for a day on the calendar, without a time. The day the person picks is the day your code gets, whatever their time zone. It comes back as a luxon DateTime. Good for due dates, shipping days and birthdays.
The simplest one
The whole action file, and roughly what your team sees when it runs.
Set due date
What you can set
The settings you will reach for most, each with the line of code that turns it on.
A day, not an instant. No time zone is involved. Store the day with .toISODate().
Earliest and latest. The first and last day that can be picked, both included. The server checks every answer again.
A starting value. Pass a luxon DateTime, a JavaScript Date or a YYYY-MM-DD string. A day that does not exist throws.
Optional. The field is required by default. With .optional() it can stay empty and the handler gets undefined.
Your own check. .validate() gets the DateTime on the server. Return a message, such as one for a weekend.
Two dates, one check. Inside io.group several dates share one form. A check across them goes on the group and shows above Continue.
More in the docs
This page shows the idea. The docs have every prop, the checks on the server and more examples.
Next components
Three more calls on io. Each one shows a control and hands your code a typed value.
Write your first tool today.
An async function, a few await calls, and the form is in the browser.