Skip to main content

io.input.date

Requests a date.

Usage

const date = await io.input.date("Date");
interval.com

Props

defaultValue

object | Date Optional

Default value for the input. Can be a Date object or an object with the following values:

day

number Required

The day of the month of the default date.

month

number Required

The calendar month of the default date, 1-12.

year

number Required

The year of the default date.

disabled

boolean Optional

Whether the input is disabled, preventing changes from the `defaultValue`.

helpText

string Optional

Optional label providing additonal context.

max

object Optional

Latest possible date value for the input.

day

number Required

The day of the month of the maximum date.

month

number Required

The calendar month of the maximum date, 1-12.

year

number Required

The year of the maximum date.

min

object Optional

Earliest possible date value for the input.

day

number Required

The day of the month of the minimum date.

month

number Required

The calendar month of the minimum date, 1-12.

year

number Required

The year of the minimum date.

Returns

object

day

number

The day of the month of the provided date.

jsDate

Date

JavaScript Date object containing the date value.

month

number

The calendar month of the provided date, 1-12.

year

number

The year of the provided date.
Was this section useful?
On this page