You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sources/platform/actors/development/actor_definition/input_schema/specification.md
+52-12Lines changed: 52 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,20 +181,60 @@ Rendered input:
181
181
182
182

183
183
184
+
Example of date selection using absolute and relative `datepicker` editor:
185
+
186
+
```json
187
+
{
188
+
"absolute_date": {
189
+
"title": "Date",
190
+
"type": "string",
191
+
"description": "Select date",
192
+
"editor": "datepicker"
193
+
},
194
+
"relative_date": {
195
+
"title": "Relative date",
196
+
"type": "string",
197
+
"description": "Select date",
198
+
"editor": "datepicker",
199
+
"allowAbsolute": false,
200
+
"allowRelative": true
201
+
},
202
+
"any_date": {
203
+
"title": "Any date",
204
+
"type": "string",
205
+
"description": "Select date",
206
+
"editor": "datepicker",
207
+
"allowRelative": true
208
+
}
209
+
}
210
+
```
211
+
212
+
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`:
213
+
214
+

215
+
216
+
Rendered input for `relative_date` property in form of `+/- {number} {unit}`. (The `allowAbsolute` is explicitly set to `false`):
217
+
218
+

219
+
220
+
Rendered input for `any_date` property. The date picker allows selecting both absolute and relative dates, and it's up to the Actor author to parse recognize the chosen form:
221
+
222
+

|`editor`| One of <ul><li>`textfield`</li><li>`textarea`</li><li>`javascript`</li><li>`python`</li><li>`select`</li><li>`datepicker`</li><li>`hidden`</li></ul> | Yes | Visual editor used for <br/>the input field. |
189
-
|`pattern`| String | No | Regular expression that will be <br/>used to validate the input. <br/> If validation fails, <br/>the Actor will not run. |
190
-
|`minLength`| Integer | No | Minimum length of the string. |
191
-
|`maxLength`| Integer | No | Maximum length of the string. |
192
-
|`enum`|[String]| Required if <br/>`editor` <br/>is `select`| Using this field, you can limit values <br/>to the given array of strings. <br/>Input will be displayed as select box. |
193
-
|`enumTitles`|[String]| No | Titles for the `enum` keys described. |
194
-
|`nullable`| Boolean | No | Specifies whether `null` <br/>is an allowed value. |
195
-
|`isSecret`| Boolean | No | Specifies whether the input field<br />will be stored encrypted.<br />Only available <br />with `textfield` and `textarea` editors. |
196
-
|`allowAbsolute`| Boolean | No | Used only with `datepicker` editor for absolute date value picker in form `YYYY-MM-DD`. This defaults to `true`. |
197
-
|`allowRelative`| Boolean | No | Used only with `datepicker` editor for relative input in form `+/- {number} {unit}`e.g. `+ 3 weeks`. 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. |
|`editor`| One of <ul><li>`textfield`</li><li>`textarea`</li><li>`javascript`</li><li>`python`</li><li>`select`</li><li>`datepicker`</li><li>`hidden`</li></ul> | Yes | Visual editor used for <br/>the input field. |
229
+
|`pattern`| String | No | Regular expression that will be <br/>used to validate the input. <br/> If validation fails, <br/>the Actor will not run. |
230
+
|`minLength`| Integer | No | Minimum length of the string. |
231
+
|`maxLength`| Integer | No | Maximum length of the string. |
232
+
|`enum`|[String]| Required if <br/>`editor` <br/>is `select`| Using this field, you can limit values <br/>to the given array of strings. <br/>Input will be displayed as select box. |
233
+
|`enumTitles`|[String]| No | Titles for the `enum` keys described. |
234
+
|`nullable`| Boolean | No | Specifies whether `null` <br/>is an allowed value. |
235
+
|`isSecret`| Boolean | No | Specifies whether the input field<br />will be stored encrypted.<br />Only available <br />with `textfield` and `textarea` editors. |
236
+
|`allowAbsolute`| Boolean | No | Used only with `datepicker` editor for absolute date value picker in form `YYYY-MM-DD`. This defaults to `true`. |
237
+
|`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. |
0 commit comments