Time-picker widget

The time-picker widget enables users to select a time.

Additional properties

This widget inherits the properties of the Quick-reply-button widget. It also has the following properties:

Property

Description

Data type

endHour

Last hour available for selection.

integer

endMinute

Last minute available for selection.

integer

format

Time format, which is one of: 24|12.

enum

id

Unique identifier of this widget.

string

startHour

First hour available for selection.

integer

startMinute

First minute available for selection.

integer

step

Minute that displays the subsequent slot from the first hour and minute.

integer

times

Array of displayed time slots. Either use the range properties, described above, or provide predefined time slots in this array.

string

type Rich-media type, which is always TimePicker. string

Code sample

 var obj = {
    "widgetType": "form",
    "nodes":
    [{
            "id": "widget1",
            "controls": {
                "0": {
                    "type": "TimePicker",
                    "id": "tp1",
                    "startHour": 8,
                    "startMinute": 20,
                    "endHour": 13,
                    "endMinute": 30,
                    "step": 35,
                    "format": "24",
                    "context": {
                        "color": "#d3d3d3",
                        "textColor": "#000000"
                    }
                }
            }
        }
    ]
}