Skip to main content
Version: 1.21.3

durationinput

The <durationinput> tag to add a field showing the duration of the time.

Available attributes:

AttributeTypeMandatoryDescription
alignRightBooleanNSet the value to true to align text to the right. The default value is false; the text is aligned to the left.
valueIntegerNSpecify the time in milliseconds.
maxValueIntegerNSpecify the maximum value in milliseconds.
excludeArrayNSpecify the time units that should be hidden.
onChangeFunctionNSpecify the function to call when the value changes. Set the attribute value to the custom s_widget_custom method created in the client script.

Example:

durationinput
<durationinput 
value="{data.currentTimeSpent}"
maxValue="86340000"
exclude='["days","seconds"]'
alignRight="true"
onChange="s_widget_custom.onChangeTimeSpent(arguments[0])"
></durationinput>

The template above adds the following element to the page: