DatetimePickerTemplateActionBuilder
in package
implements
TemplateActionBuilder
A builder class for datetime picker action.
When this action is tapped, a postback event is returned via webhook with the date and time selected by the user from the date and time selection dialog.
Interfaces, Classes and Traits
- TemplateActionBuilder
- The interface that has a responsibility to build template action.
Table of Contents
- $data : string
- $initial : string
- $label : string
- $max : string
- $min : string
- $mode : string
- __construct() : mixed
- DatetimePickerAction constructor.
- buildTemplateAction() : array<string|int, mixed>
- Builds datetime picker action structure.
Properties
$data
private
string
$data
$initial
private
string
$initial
$label
private
string
$label
$max
private
string
$max
$min
private
string
$min
$mode
private
string
$mode
Methods
__construct()
DatetimePickerAction constructor.
public
__construct(string $label, string $data, string $mode[, string $initial = null ][, string $max = null ][, string $min = null ]) : mixed
Parameters
- $label : string
-
Label for the action Required for templates other than image carousel. Max: 20 characters Optional for image carousel templates. Max: 12 characters.
- $data : string
-
String returned via webhook in the postback.data property of the postback event Max: 300 characters
- $mode : string
-
Action mode date: Pick date time: Pick time datetime: Pick date and time
- $initial : string = null
-
Initial value of date or time
- $max : string = null
-
Largest date or time value that can be selected. Must be greater than the min value.
- $min : string = null
-
Smallest date or time value that can be selected. Must be less than the max value.
Return values
mixed —buildTemplateAction()
Builds datetime picker action structure.
public
buildTemplateAction() : array<string|int, mixed>
Return values
array<string|int, mixed> —Built datetime picker action structure.