Skip to main content

Date Time Picker Element

DateTimeElement is used to represent a single input field that allows to select date and time.

Properties:

PropertyTypeDescription
elementTypeStringdefaults to UIElementTypeConstants.dropdown
elementIdStringunique ID for the interaction element
labelStringaccepts a string. It is the label of the dropdown.
modeDateTimeVisibilityModeIt is the mode of the date time picker.
fromDateTimeIt is the start date of the date time picker.
toDateTimeIt is the end date of the date time picker.
placeholderTextInputPlaceholderIt is the placeholder of the date time picker.
formattedResponseDateTimethe default value of the date time element.
dateTimeFormatStringIt is the format of the date time picker.
responseStringIt is the response of the input element.
defaultValueStringIt is the default value of the input element.
optionalboolIt states if the input element is optional.

Usage

Here's an example of how you can create an instance of the DateTimeElement class:

In this example, a new instance of DateTimeElement is created with the elementId "1" and the label text "Select a Date".


Example

Here is an example that showcases the creation and manipulation of an instance of DateTimeElement:

DateTimeElement(elementId: "1", label: "Select a Date", formattedResponse: DateTime.now(),)