io.input.datetime() requests a point in time and returns it as a luxon DateTime. Provided by the @awaitio/input-datetime package.

Install
Setup
Register it under the key you want inio, see Input components:
app.ts
Usage
Props
defaultValue, min and max take a luxon DateTime, a JavaScript Date or an ISO 8601 string. An impossible date such as 2026-02-30 throws when the io call is made.
Optional
The field is required. Chain.optional() to let it stay empty; the handler then gets DateTime | undefined, see Optional fields.
Returns
A luxonDateTime in the UTC zone. Convert it with .setZone(...) when you need local time, or .toISO() to store it.
Built-in validation
The field is always required. The input works in whole minutes, somin and max are compared at minute precision: min: DateTime.now() still accepts the current minute. The server checks every answer:
<min> and <max> are printed in UTC.
Custom validation
Chain.validate() for a check of your own. It runs on the server after the checks above, gets the value the handler would get and returns a message to show under the field, or nothing when the value is fine; see Custom validation.