feat(widget-date): add input display formatting (#1739)

This commit is contained in:
Björn Rixman
2018-11-22 02:13:32 +01:00
committed by Shawn Erquhart
parent 9706b3cac7
commit 855efd848e
4 changed files with 36 additions and 9 deletions

View File

@ -11,6 +11,8 @@ The date widget translates a date picker input to a date string. For saving date
- **Options:**
- `default`: accepts a date string, or an empty string to accept blank input; otherwise defaults to current date
- `format`: optional; accepts Moment.js [tokens](https://momentjs.com/docs/#/parsing/string-format/); defaults to raw Date object (if supported by output format)
- `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"

View File

@ -11,6 +11,8 @@ The datetime widget translates a datetime picker to a datetime string. For savin
- **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)
- `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.
- **Example:**
```yaml
- label: "Start time"