chore: update datetime widget and deprecate date widget (#2615)

This commit is contained in:
melbourne2991
2019-09-06 06:16:55 +10:00
committed by Shawn Erquhart
parent 8d404a0d54
commit 65d49dae9a
5 changed files with 154 additions and 14 deletions

View File

@ -1,8 +1,10 @@
---
title: date
label: "Date"
label: 'Date'
---
_**Deprecation notice**: the date widget has been deprecated and will be removed in the next major release. Please use the datetime widget instead._
The date widget translates a date picker input to a date string. For saving date and time together, use the datetime widget.
- **Name:** `date`
@ -14,10 +16,10 @@ The date widget translates a date picker input to a date string. For saving date
- `dateFormat`: optional; boolean or Moment.js [tokens](https://momentjs.com/docs/#/parsing/string-format/). If `true` use default locale format.
- `timeFormat`: optional; boolean or Moment.js [tokens](https://momentjs.com/docs/#/parsing/string-format/). If `true` use default locale format, `false` hides time-picker. Defaults to false.
- **Example:**
```yaml
- label: "Birthdate"
name: "birthdate"
widget: "date"
default: ""
format: "MMM Do YY"
```
```yaml
- label: 'Birthdate'
name: 'birthdate'
widget: 'date'
default: ''
format: 'MMM Do YY'
```