Menu

## DatetimePickerTemplateActionBuilder
in package
implements TemplateActionBuilder

DatetimePickerTemplateActionBuilder.php : 32

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

DatetimePickerTemplateActionBuilder.php : 37
`private string $data`

#### $initial

DatetimePickerTemplateActionBuilder.php : 41
`private string $initial`

#### $label

DatetimePickerTemplateActionBuilder.php : 35
`private string $label`

#### $max

DatetimePickerTemplateActionBuilder.php : 43
`private string $max`

#### $min

DatetimePickerTemplateActionBuilder.php : 45
`private string $min`

#### $mode

DatetimePickerTemplateActionBuilder.php : 39
`private string $mode`

### Methods

#### __construct()

DatetimePickerTemplateActionBuilder.php : 65

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()

DatetimePickerTemplateActionBuilder.php : 80

Builds datetime picker action structure.

`public buildTemplateAction() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

Built datetime picker action structure.

## Search results