Optional
displayProtected
lowerProtected
maxProtected
maxProtected
minProtected
minProtected
resolutionProtected
timeOptional
timeoutProtected
upperCalculates the number of steps within the given time range based on the specified time resolution. The returned number is zero base, indicating the index of the slider position. The range starts at the minValue of the provided timeOptions.
Optional
maxVal: DateThe upper limit for the range. Defaults to the timeOptions > maxValue if not provided.
The number of slider steps based on the resolution and time range.
Deserialize an element and set the current element state to the deserialized one
The element serialization as returned by the serialize method
When the component is disconnected from the DOM all the callbacks will be unregistered
Dispatches a debounced time change event to prevent frequent server calls.
Optional
unset: boolean = falseIndicates whether the time will be set to undefined.
Protected
getOptional
limit: TimeRangeLimitGet the current time restriction as a formatted query string.
The formatted time restriction as string or undefined if the time restriction is empty.
Retrieves the value associated with the input element of the specified limit.
Optional
limit: TimeRangeLimitOptional parameter specifying the limit ('upper' or 'lower') for which value is to be fetched.
The date string value retrieved from the input element.
Hide the component (display: none).
Convert the string in parameter with uHtml and return it. This allows to convert a string with html in a right html object. For example, htmlUnsafe('
') will return an html div object.Initializes the widget and sets properties of the input elements. Must be called before using the widget.
Configuration options for the time widget.
NOTE REG: We cannot just use truthy here, because javascript comparaison table is really problematic. For example: 0 == false [] == false "" == false And there are cases where we want to check null or undefined, because 0 can be a right value. More here : https://dorey.github.io/JavaScript-Equality-Table/
Re-Render the component. The method should be called when the component has already been rendered and needs to be updated.
Render the component's template.
Renders a hidden span with the name of the component. Useful to render a placeholder for not visible component.
Resets the input elements to their default states. This will be the min and max slider position
or the optionally defined minDefaultValue
and maxDefaultValue
.
Without minDefaultValue
and maxDefaultValue
, the slider state is set to disable.
The method will trigger a TimeChangeEvent
that bubbles up to the parent component.
Returns the serialization of the current element. This method should be overwritten by child classes
An object describing the current element serialized
Transforms the date string to a slider position and set it to the specified input element.
Optionally, the timeChange
event can be omitted.
Updates the UI elements (output, slider track) to the new value
and validates the positions of the sliders so the handles do not cross each other range
mode.
The date string to be set as the value.
Optional
limit: TimeRangeLimit = 'lower'The time range limit for which the value is to be set ('lower' or 'upper').
Optional
triggerEvent: boolean = trueWeather the timeChange
event should be dispatched.
Show the component (display: block).
In the templates, sometimes for accessibility reasons, we have to support the KeyDown Event In those case, we often juste want to do the same as the click event when Enter or Space is pressed Then this method can be used : it just calls the click event on the same element
Optional
eventNames: GgUserInteractionEvent | GgUserInteractionEvent[]
A widget that represents a time slider with configurable time resolution. The slider supports a single value or a time range depending on the specified mode.
It consists of two
<input>
elements of typerange
that are configured by receivingtimeOptions
in its initialize method. It validates input changes to ensure compliance with the definedtimeOptions
and dynamically updates output elements to display nicely formatted time values.