Single-line Input Type: Date
Attribute Name | Data Type | Description |
type* | String Value should be date | The type of input field. For single line text input, type must be date. |
placeholder* | String (100) | Sample field value displayed to the user that describes the expected value of the input field. |
name* | String (50) | A unique identifier for the field. On form submission, the value defined for this key will be available in the function associated with the form. |
label* | String (50) | Describes the field display name. |
hint | String (100) | Provides a brief description of the field's purpose and the expected input. |
value | Timestamp (100) | Provide a default date as the field value. Expected Format: yyyy-MM-DD For example: 2000-01-01 |
mandatory | Boolean | Define if the field's requisite is mandatory or not. Default value considered is true. |
filter | JSON Object Optional | To manage date selections from the date picker, you can specify a date range and limit the selection to specific days of the week. |
Attribute | Type | Description |
from | String | The earliest selectable date-time in the date picker. Allowed format : yyyy-MM-DD . Refer applicable date-time literals |
to | String | The latest selectable date-time in the date picker. Allowed format : yyyy-MM-DD . Refer applicable date-time literals |
allowed_days | Array of Strings | Days of the week that are allowed for selection. Allowed values : monday | tuesday | wednesday | thursday | friday | saturday | sunday |
Syntax for filter object:
filter : {
"from" : $<Date>,
"to" : $<Date>,
"allowed_days" : [ $<"monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday"> ]
}
Note:
The filter object cannot be empty.
At least one of the following keys (from, to, or allowed_days) is required for the filter to take effect.
Syntax
{
"hint": "",
"name": "",
"label": "",
"placeholder": "",
"type": "date",
"value": "",
"mandatory":true //boolean, default is set true
}
Code Sample
return {
"type":"form",
"title":"ZylTrix Registration",
"name":"marathon",
"hint":"Submit your details to early access to ZylTrix!",
"button_label":"Register",
"inputs":[
{
"label":"Access required till",
"name":"dateinfo",
"placeholder":"Mention till when you'd require the access",
"value":"2025-03-31",
"filter":{
"from":"2025-03-31",
"to":"2025-09-24",
"allowed_days":[
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
]
},
"mandatory":true,
"type":"date"
}
],
"action":{
"type":"invoke.function",
"name":"userinfo"
}
};