ebc2471c6b
Prettier formatting our markdown files is causing bugs because of the differences between Gatsby's parser and Prettier's. Also, Prettier formats the inline code-blocks containing example CMS configs, but the formatting it uses doesn't really make much sense or match the suggested CMS config style. It doesn't actually make much sense to format the docs anyway, since we use the CMS itself to edit/generate them.
22 lines
711 B
Markdown
22 lines
711 B
Markdown
---
|
|
label: "DateTime"
|
|
target: datetime
|
|
---
|
|
|
|
The datetime widget translates a datetime picker to a datetime string. For saving the date only, use the date widget.
|
|
|
|
- **Name:** `datetime`
|
|
- **UI:** datetime picker
|
|
- **Data type:** Moment.js-formatted datetime string
|
|
- **Options:**
|
|
- `default`: accepts a datetime string, or an empty string to accept blank input; otherwise defaults to current datetime
|
|
- `format`: optional; accepts Moment.js [tokens](https://momentjs.com/docs/#/parsing/string-format/); defaults to raw Date object (if supported by output format)
|
|
- **Example:**
|
|
```yaml
|
|
- label: "Start time"
|
|
name: "start"
|
|
widget: "datetime"
|
|
default: ""
|
|
format: "LLL"
|
|
```
|