Skip to content

Commit

Permalink
Update datetime for 3.3.0 (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjagodic authored Aug 12, 2024
1 parent cf1440c commit 01e54d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions content/docs/widgets/datetime.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ The datetime widget translates a datetime picker to a datetime string.
- **UI:** datetime picker
- **Data type:** [Day.js](https://day.js.org/)-formatted datetime string
- **Options:**
- `default`: accepts a datetime string, or an empty string to accept blank input; otherwise defaults to current datetime.
- `default`: accepts a datetime string, or `'{{now}}'` to fill in the current datetime; otherwise defaults to empty string.

<small>Unitl 3.2.1 it defaults to current datetime. To get an empty field, set default to empty string.</small>
- `format`: sets storage format; accepts [Day.js formats](https://day.js.org/docs/en/display/format); defaults to ISO8601 (if supported by output format). If set, `date_format` and `time_format` are not used.
- `date_format`: sets date display format in UI; boolean or [Day.js formats](https://day.js.org/docs/en/display/format). If used without `time_format`, only the date picker is displayed.
- `time_format`: sets time display format in UI; boolean or [Day.js formats](https://day.js.org/docs/en/display/format). If used without `date_format`, only the time picker is displayed.
Expand All @@ -19,7 +21,7 @@ The datetime widget translates a datetime picker to a datetime string.
- label: "Start time"
name: "start"
widget: "datetime"
default: ""
default: "{{now}}"
date_format: "DD.MM.YYYY" # e.g. 24.12.2021
time_format: "HH:mm" # e.g. 21:07
format: "LLL"
Expand Down

0 comments on commit 01e54d8

Please sign in to comment.