-
Notifications
You must be signed in to change notification settings - Fork 133
docs: add datepicker dateType property to input schema #1227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
202ef8e
2c0e0a1
703212f
ab0126c
8467240
d2f0598
e45ca6a
bdacb5d
5d55dc0
bd909f5
551d105
d774d41
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -181,18 +181,60 @@ Rendered input: | |||||
|
|
||||||
|  | ||||||
|
|
||||||
| Example of date selection using absolute and relative `datepicker` editor: | ||||||
|
|
||||||
| ```json | ||||||
| { | ||||||
| "absolute_date": { | ||||||
| "title": "Date", | ||||||
| "type": "string", | ||||||
| "description": "Select date", | ||||||
| "editor": "datepicker" | ||||||
mfori marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| }, | ||||||
| "relative_date": { | ||||||
mfori marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| "title": "Relative date", | ||||||
| "type": "string", | ||||||
| "description": "Select date", | ||||||
mfori marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| "editor": "datepicker", | ||||||
| "allowAbsolute": false, | ||||||
| "allowRelative": true | ||||||
| }, | ||||||
| "any_date": { | ||||||
| "title": "Any date", | ||||||
| "type": "string", | ||||||
| "description": "Select date", | ||||||
| "editor": "datepicker", | ||||||
| "allowRelative": true | ||||||
| } | ||||||
| } | ||||||
| ``` | ||||||
|
|
||||||
| Rendered input for `absolute_date` property. See that by default, the date picker allows selecting only an absolute date in the form `YYYY-MM-DD`: | ||||||
|
||||||
| Rendered input for `absolute_date` property. See that by default, the date picker allows selecting only an absolute date in the form `YYYY-MM-DD`: | |
| The `absolute_date` property renders a date picker that allows selection of a specific date in the format `YYYY-MM-DD`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I'd stress here that this is the value returned by the field. See comment bellow.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Rendered input for `relative_date` property in form of `+/- {number} {unit}`. (The `allowAbsolute` is explicitly set to `false`): | |
| The `relative_date` property renders an input field that accepts dates in the `+/- {number} {unit}`. nthe `allowAbsolute` parameter is set to `false` to restrict input to relative dates only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, to make this clear, we should write that
...renders an input field that enables the user to choose the relative date and returns the value in the format
+/- {number} {unit}, for example,+ 2 days.
This is a documentation for Actor developers so we need to focus on what is returned by the field which is what they work with.
mfori marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
mfori marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | `allowRelative` | Boolean | No | Used only with `datepicker` editor for relative input in form `+/- {number} {unit}`.<br/>The value passed to Actor input is in plain text e.g. `"+ 3 weeks"` and it's up to Actor author to parse it.<br/>Supported units are: days, weeks, months and years.<br/>If only relative input is required, `allowAbsolute` needs to be explicitly set to `false`, otherwise both formats are supported. | | |
| | `allowRelative` | Boolean | No | Enables relative date input in <br/>`+/- {number} {unit}` format. <br/>Supported units are: days, weeks, months, years. <br/><br/>The input is passed to the Actor as plain text (e.g., "+3 weeks"). Set `allowAbsolute` to `false` to allow only relative input, otherwise both formats are supported. Only available with `datepicker` editor. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also recommend here a library we use to parse this? It's docs for devs so let's give them some hints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

Uh oh!
There was an error while loading. Please reload this page.