io.input.datetime
Requests a date & time.
Usage
const datetime = await io.input.datetime("Date & time");
interval.com
Props
defaultValue
object 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 datetime.
hour
number Required
The hour of the default datetime value.
minute
number Required
The minute of the default datetime value.
month
number Required
The calendar month of the default datetime, 1-12.
year
number Required
The year of the default datetime.
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 datetime value for the input.
day
number Required
The day of the month of the maximum datetime.
hour
number Required
The hour of the maximum datetime, 1-12.
minute
number Required
The minute of the maximum datetime.
month
number Required
The calendar month of the maximum datetime, 1-12.
year
number Required
The year of the maximum date.
min
object Optional
Earliest possible datetime value for the input.
day
number Required
The day of the month of the minimum datetime.
hour
number Required
The hour of the minimum datetime, 1-12.
minute
number Required
The minute of the minimum datetime.
month
number Required
The calendar month of the minimum datetime, 1-12.
year
number Required
The year of the minimum datetime.
Returns
object
day
number
The day of the month of the provided datetime.
hour
number
The hour in the day of the provided datetime, 0-23.
jsDate
Date
JavaScript Date object containing the datetime values.
minute
number
The minute of the provided datetime.
month
number
The calendar month of the provided datetime, 1-12.
year
number
The year of the provided datetime.
Was this section useful?