Range Calendar for Zia Skills
You can use this card to fetch a range of date and time inputs with the calendar interface, the visitor can choose the start date and the end date in the calendar.
Attribute | Mandatory | Description | Values | |
type | Yes | The type of the input to be displayed to the visitor | range-calendar | |
time | No | You can specify that either the calendar should display only the date or time along with the date. | true - To allow the visitor to choose the time value along with the Date | |
from | No | You can specify the Minimum date range from where the visitor are allowed to choose the date ie., the onset date the visitor are allowed to select from the calendar. | +/- Integer | The no. of days to be specified in the calendar will be calculated before and after the present-day. |
For Example: +5 - This will calculate 5 days after the present-day | ||||
Long | The date value is specified in milliseconds | |||
For Example: 123232323 - start date / time specified in the calendar | ||||
to | No | You can specify the Maximum date range from where the visitor are allowed to choose the date ie., the latest date the visitor are allowed to select from the calendar. | +/- Integer | The no. of days to be specified in the calendar will be calculated before and after the present-day. |
For Example:
+5 - This will calculate 5 days after the present-day | ||||
Long | The date value is specified in milliseconds | |||
For Example: 123232323 - start date / time specified in the calendar | ||||
tz | No | You can specify to allow the visitor to choose the timezone in the calendar | true - To allow the visitor to choose the timezone in the calendar. If not specified, then the timezone of the visitor's device will be taken by default. | |
select_label | No | To set customized text for widget values/slot submission actions | Instead of 'Schedule', they can use custom text like 'Choose a slot" Note: Maximum character limit for values passed inside the select_label key is 20 |
Use Case:
Context Handler function:
Copiedresult = Map();
response = Map();
response.put("action", "reply");
response.put("replies", [
"Choose your convenient date"
]);
response.put("input", {
"type": "range-calendar",
"time": true,
"tz": true,
"from": "-5",
"label": "Schedule a meeting",
"to": "+5",
"select_label": "Choose a slot"
});
prompt = Map();
prompt.put("param_name", "calendarrange");
prompt.put("data", response);
result.put("prompt", prompt);
result.put("todo", "prompt");
return result;