These inputs are for editing date and time values in your data.
If timezone
is set in your global configuration, date values are saved with the matching offset suffix. If unset, date values are saved without an offset suffix in UTC.
For Jekyll sites, date values are saved in the Jekyll-expected format (e.g. 2021-01-09 00:00:00
) rather than standard ISO 8601.
Combination date picker and 12-hour time input.
Datetime inputs are shown for inputs configured with the type datetime
, for date input values, or for input keys matching:
date
datetime
*_datetime
at
*_at
date: 2020-07-15T12:00:00Z
when: 2020-07-15T12:00:00Z
_inputs:
when:
type: datetime
date = 2020-07-15T12:00:00Z
when = 2020-07-15T12:00:00Z
[_inputs.when]
type = "datetime"
{
"date": "2020-07-15T12:00:00Z"
}
{
"when": "2020-07-15T12:00:00Z",
"_inputs": {
"when": {
"type": "datetime"
}
}
}
Date picker input for date values with year, month, and day.
Date inputs are shown for inputs configured with the type date, or for inputs keys matching:
*_date
sale_start_date: 2021-01-09T00:00:00Z
due_by: 2021-01-09T00:00:00Z
_inputs:
due_by:
type: date
sale_start_date = 2021-01-09T00:00:00Z
due_by: 2021-01-09T00:00:00Z
[_inputs.due_by]
type = "date"
{
"sale_start_date": "2021-01-09T00:00:00Z"
}
{
"due_by": "2021-01-09T00:00:00Z",
"_inputs": {
"due_by": {
"type": "date"
}
}
}
The time value is always added for Date inputs as 00:00:00
for consistency with Datetime inputs.
Single line 12-hour time input for strings of time values.
Time inputs are shown for inputs configured with the type time
, or for input keys matching:
time
*_time
opening_time: 8:00 am
doors_open: 8:00 am
_inputs:
doors_open:
type: time
opening_time = "8:00 am"
doors_open = "8:00 am"
[_inputs.doors_open]
type = "time"
{
"opening_time": "8:00 am"
}
{
"doors_open": "8:00 am",
"_inputs": {
"doors_open": {
"type": "time"
}
}
}
Date, Datetime and Time input options are configured with options
inside an _inputs
entry.
timezone
- String
Specifies the time zone that dates are displayed and edited in. Also changes the suffix the date is persisted to the file with. Must be in the tz database name format (e.g. Pacific/Auckland
or America/New_York
). Defaults to the timezone
configured in your global configuration file, which defaults to Etc/UTC
.
Available on Date and Datetime inputs, has no effect on Time inputs.
empty_type
- string
Set how an ‘empty’ value will be saved. Does not apply to existing empty values. Can be one of the following:
string
- an empty value for this input will be stored as ""
.null
- an empty value for this input will be stored as a null value (default). This does not apply to TOML files.