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.

src/actions/invoices/setDueDateAction.ts
import { DateTime } from 'luxon';
import { app } from '../../app';
export const setDueDateAction = app.defineAction({
name: 'Set due date',
handler: async ({ io }) => {
const dueOn = await io.input.date('Due date', {
defaultValue: DateTime.now().plus({ days: 14 }),
min: DateTime.now(),
});
},
});
The code. One call in an action, the whole file.
tools.example.com/actions/invoices/set_due_date

Set due date

Due date
Nov 10, 2026
Continue
In the browser. Roughly what your team sees. Your theme decides the details.

What you can set

The settings you will reach for most, each with the line of code that turns it on.

dueOn.toISODate(); // '2026-11-10'

A day, not an instant. No time zone is involved. Store the day with .toISODate().

min: '2026-11-10', max: '2026-12-31'

Earliest and latest. The first and last day that can be picked, both included. The server checks every answer again.

defaultValue: '2026-11-10'

A starting value. Pass a luxon DateTime, a JavaScript Date or a YYYY-MM-DD string. A day that does not exist throws.

io.input.date('Birthday').optional()

Optional. The field is required by default. With .optional() it can stay empty and the handler gets undefined.

.validate((date) => check(date))

Your own check. .validate() gets the DateTime on the server. Return a message, such as one for a weekend.

endsOn: io.input.date('Ends on'),

Two dates, one check. Inside io.group several dates share one form. A check across them goes on the group and shows above Continue.

Write your first tool today.

An async function, a few await calls, and the form is in the browser.

AwaitIO is free for small teams, made possible by companies and people who sponsor it.