durationinput
The <durationinput> tag to add a field showing the duration of the time.
Available attributes:
Attribute | Type | Mandatory | Description |
---|---|---|---|
alignRight | Boolean | N | Set the value to true to align text to the right. The default value is false; the text is aligned to the left. |
value | Integer | N | Specify the time in milliseconds. |
maxValue | Integer | N | Specify the maximum value in milliseconds. |
exclude | Array | N | Specify the time units that should be hidden. |
onChange | Function | N | Specify 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: