Class sap.suite.ui.commons.DateRangeSliderModule: sap/suite/ui/commons/DateRangeSlider

extends Control

The Date Range Slider provides the user with a Range Slider control that is optimized for use with Dates.

Deprecated API:Since version 1.34. Deprecated. Not Fiori.

Constructor Summary
new sap.suite.ui.commons.DateRangeSlider(sId?, mSettings?)Constructor for a new DateRangeSlider.
Event Summary
change(oControlEvent)This event is fired when user changes completes the selection of a new date using a grip.
liveChange(oControlEvent)This live event is fired as the user slides a grip with the mouse.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.suite.ui.commons.DateRangeSlider.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.suite.ui.commons.DateRangeSlider with name sClassName and enriches it with the information contained in oClassInfo.
sap.suite.ui.commons.DateRangeSlider.getMetadata()Returns a metadata object for class sap.suite.ui.commons.DateRangeSlider.
attachChange(oData?, fnFunction, oListener?)Attach event handler fnFunction to the 'change' event of this sap.suite.ui.commons.DateRangeSlider.
attachLiveChange(oData?, fnFunction, oListener?)Attach event handler fnFunction to the 'liveChange' event of this sap.suite.ui.commons.DateRangeSlider.
detachChange(fnFunction, oListener)Detach event handler fnFunction from the 'change' event of this sap.suite.ui.commons.DateRangeSlider.
detachLiveChange(fnFunction, oListener)Detach event handler fnFunction from the 'liveChange' event of this sap.suite.ui.commons.DateRangeSlider.
fireChange(mArguments?)Fire event change to attached listeners.
fireLiveChange(mArguments?)Fire event liveChange to attached listeners.
getEditable()Getter for property editable.
getEnabled()Getter for property enabled.
getLabels()Getter for property labels.
getMax()Getter for property max.
getMin()Getter for property min.
getPinGrip()Getter for property pinGrip.
getPinGrip2()Getter for property pinGrip2.
getShowBubbles()Getter for property showBubbles.
getSmallStepWidth()Getter for property smallStepWidth.
getStepLabels()Getter for property stepLabels.
getTotalUnits()Getter for property totalUnits.
getValue()Get value property for the control.
getValue2()Get value2 property for the control.
getVisible()Getter for property visible.
getWidth()Getter for property width.
setDateFormat(oDateFormat)Setter for dateFormat which is used to format the dates for Labels, bubble texts, and tool tips.
setDayGranularity()Set Date Range Slider Granularity to Day
setEditable(bEditable)Set editable property for the DateRangeSlider
setEnabled(bEnabled)Set enabled property for the DateRangeSlider
setLabels(aLabels)Set labels property for the DateRangeSlider
setMax(dMax)Set max property for the DateRangeSlider.
setMin(dMin)Set min property for the DateRangeSlider.
setMonthGranularity()Set Date Range Slider Granularity to Month
setPinGrip(bPinGrip)Set pinGrip property for the DateRangeSlider
setPinGrip2(bPinGrip2)Set pinGrip2 property for the DateRangeSlider
setShowBubbles(bShowBubbles)Set showBubbles property for the DateRangeSlider
setSmallStepWidth(fSmallStepWidth)Set smallStepWidth property for the DateRangeSlider
setStepLabels(bStepLabels)Set stepLabels property for the DateRangeSlider
setTotalUnits(iTotalUnits)Set totalUnits property for the DateRangeSlider
setValue(dValue)Set value property for the DateRangeSlider.
setValue2(dValue2)Set value2 property for the DateRangeSlider.
setVisible(bVisible)Set visible property for the DateRangeSlider
setWidth(tWidth)Set width property for the DateRangeSlider
Constructor Detail
new sap.suite.ui.commons.DateRangeSlider(sId?, mSettings?)
Constructor for a new DateRangeSlider.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers.

If the name of a setting is ambiguous (e.g. a property has the same name as an event), then the framework assumes property, aggregation, association, event in that order. To override this automatic resolution, one of the prefixes "aggregation:", "association:" or "event:" can be added to the name of the setting (such a prefixed name must be enclosed in single or double quotes).

The supported settings are:

  • Properties
  • Aggregations
    • Associations
      • Events
        • change : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
        • liveChange : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
      Parameters:
      {string}sId? id for the new control, generated automatically if no id is given
      {object}mSettings? initial settings for the new control
      Deprecated:
      Since version 1.34. Deprecated. Not Fiori.
      Event Detail
      change(oControlEvent)
      This event is fired when user changes completes the selection of a new date using a grip. It contains the Date object value of each grip such that the left grip value is held by the value property and the right grip value is held by the value2 property.
      Parameters:
      {sap.ui.base.Event}oControlEvent
      {sap.ui.base.EventProvider}oControlEvent.getSource
      {object}oControlEvent.getParameters
      liveChange(oControlEvent)
      This live event is fired as the user slides a grip with the mouse. It contains the Date object value of each grip such that the left grip value is held by the value property and the right grip value is held by the value2 property.
      Parameters:
      {sap.ui.base.Event}oControlEvent
      {sap.ui.base.EventProvider}oControlEvent.getSource
      {object}oControlEvent.getParameters
      Method Detail
      sap.suite.ui.commons.DateRangeSlider.extend(sClassName, oClassInfo?, FNMetaImpl?): function
      Creates a new subclass of class sap.suite.ui.commons.DateRangeSlider with name sClassName and enriches it with the information contained in oClassInfo.

      oClassInfo might contain the same kind of informations as described in Element.extend.

      Parameters:
      {string}sClassName name of the class to be created
      {object}oClassInfo? object literal with informations about the class
      {function}FNMetaImpl? constructor function for the metadata object. If not given, it defaults to sap.ui.core.ElementMetadata.
      Returns:
      {function} the created class / constructor function
      sap.suite.ui.commons.DateRangeSlider.getMetadata(): sap.ui.base.Metadata
      Returns a metadata object for class sap.suite.ui.commons.DateRangeSlider.
      Returns:
      {sap.ui.base.Metadata} Metadata object describing this class
      attachChange(oData?, fnFunction, oListener?): sap.suite.ui.commons.DateRangeSlider
      Attach event handler fnFunction to the 'change' event of this sap.suite.ui.commons.DateRangeSlider.
      . When called, the context of the event handler (its this) will be bound to oListener if specified otherwise to this sap.suite.ui.commons.DateRangeSlider.
      itself.

      This event is fired when user changes completes the selection of a new date using a grip. It contains the Date object value of each grip such that the left grip value is held by the value property and the right grip value is held by the value2 property.

      Parameters:
      {object}oData? An application specific payload object, that will be passed to the event handler along with the event object when firing the event.
      {function}fnFunction The function to call, when the event occurs.
      {object}oListener? Context object to call the event handler with. Defaults to this sap.suite.ui.commons.DateRangeSlider.
      itself.
      Returns:
      {sap.suite.ui.commons.DateRangeSlider}this to allow method chaining
      attachLiveChange(oData?, fnFunction, oListener?): sap.suite.ui.commons.DateRangeSlider
      Attach event handler fnFunction to the 'liveChange' event of this sap.suite.ui.commons.DateRangeSlider.
      . When called, the context of the event handler (its this) will be bound to oListener if specified otherwise to this sap.suite.ui.commons.DateRangeSlider.
      itself.

      This live event is fired as the user slides a grip with the mouse. It contains the Date object value of each grip such that the left grip value is held by the value property and the right grip value is held by the value2 property.

      Parameters:
      {object}oData? An application specific payload object, that will be passed to the event handler along with the event object when firing the event.
      {function}fnFunction The function to call, when the event occurs.
      {object}oListener? Context object to call the event handler with. Defaults to this sap.suite.ui.commons.DateRangeSlider.
      itself.
      Returns:
      {sap.suite.ui.commons.DateRangeSlider}this to allow method chaining
      detachChange(fnFunction, oListener): sap.suite.ui.commons.DateRangeSlider
      Detach event handler fnFunction from the 'change' event of this sap.suite.ui.commons.DateRangeSlider.

      The passed function and listener object must match the ones used for event registration.

      Parameters:
      {function}fnFunction The function to call, when the event occurs.
      {object}oListener Context object on which the given function had to be called.
      Returns:
      {sap.suite.ui.commons.DateRangeSlider}this to allow method chaining
      detachLiveChange(fnFunction, oListener): sap.suite.ui.commons.DateRangeSlider
      Detach event handler fnFunction from the 'liveChange' event of this sap.suite.ui.commons.DateRangeSlider.

      The passed function and listener object must match the ones used for event registration.

      Parameters:
      {function}fnFunction The function to call, when the event occurs.
      {object}oListener Context object on which the given function had to be called.
      Returns:
      {sap.suite.ui.commons.DateRangeSlider}this to allow method chaining
      fireChange(mArguments?): sap.suite.ui.commons.DateRangeSlider
      Fire event change to attached listeners.
      Parameters:
      {Map}mArguments? the arguments to pass along with the event.
      Returns:
      {sap.suite.ui.commons.DateRangeSlider}this to allow method chaining
      fireLiveChange(mArguments?): sap.suite.ui.commons.DateRangeSlider
      Fire event liveChange to attached listeners.
      Parameters:
      {Map}mArguments? the arguments to pass along with the event.
      Returns:
      {sap.suite.ui.commons.DateRangeSlider}this to allow method chaining
      getEditable(): boolean
      Getter for property editable. This property switches the enabled state of the control. Using the date range slider interactively requires this property to be true.

      Default value is true

      Returns:
      {boolean} the value of property editable
      getEnabled(): boolean
      Getter for property enabled. This property switches the enabled state of the control. Disabled fields have different colors, and can not be focused.

      Default value is true

      Returns:
      {boolean} the value of property enabled
      getLabels(): string[]
      Getter for property labels. Labels to be displayed instead of dates.

      Default value is empty/undefined

      Returns:
      {string[]} the value of property labels
      getMax(): object
      Getter for property max. Maximum date for the slider.

      Default value is empty/undefined

      Returns:
      {object} the value of property max
      getMin(): object
      Getter for property min. Minimum date for the slider.

      Default value is empty/undefined

      Returns:
      {object} the value of property min
      getPinGrip(): boolean
      Getter for property pinGrip. Pin the left grip so that user cannot move it with the keyboard or mouse.

      Default value is false

      Returns:
      {boolean} the value of property pinGrip
      getPinGrip2(): boolean
      Getter for property pinGrip2. Pin the right grip so that user cannot move it with the keyboard or mouse.

      Default value is false

      Returns:
      {boolean} the value of property pinGrip2
      getShowBubbles(): boolean
      Getter for property showBubbles. Property to show or hide bubbles. Default is true.

      Default value is true

      Returns:
      {boolean} the value of property showBubbles
      getSmallStepWidth(): float
      Getter for property smallStepWidth. The grips of the control can only be moved in steps of this width.

      Default value is empty/undefined

      Returns:
      {float} the value of property smallStepWidth
      getStepLabels(): boolean
      Getter for property stepLabels. Display a date label above each tick.

      Default value is false

      Returns:
      {boolean} the value of property stepLabels
      getTotalUnits(): int
      Getter for property totalUnits. Number of units between ticks.

      Default value is empty/undefined

      Returns:
      {int} the value of property totalUnits
      getValue()
      Get value property for the control.
      getValue2()
      Get value2 property for the control.
      getVisible(): boolean
      Getter for property visible. This property switches the visible state of the control. Invisible date range slider are not rendered.

      Default value is true

      Returns:
      {boolean} the value of property visible
      getWidth(): sap.ui.core.CSSSize
      Getter for property width. Width of the horizontal date range slider.

      Default value is 100%

      Returns:
      {sap.ui.core.CSSSize} the value of property width
      setDateFormat(oDateFormat)
      Setter for dateFormat which is used to format the dates for Labels, bubble texts, and tool tips. If passed object is null or is of incorrect type, _oDateRangeSliderInternal's default formatting will be used.
      Parameters:
      {sap.ui.core.format.DateFormat}oDateFormat
      Set Date Range Slider Granularity to Day
      Returns:
      {sap.suite.ui.commons.DateRangeSlider}this to allow method chaining.
      setEditable(bEditable)
      Set editable property for the DateRangeSlider
      Parameters:
      {boolean}bEditable
      setEnabled(bEnabled)
      Set enabled property for the DateRangeSlider
      Parameters:
      {boolean}bEnabled
      setLabels(aLabels)
      Set labels property for the DateRangeSlider
      Parameters:
      {string[]}aLabels
      setMax(dMax)
      Set max property for the DateRangeSlider. This sets the maximum date for the slider.
      Parameters:
      {Date}dMax
      setMin(dMin)
      Set min property for the DateRangeSlider. This sets the minimum date for the slider.
      Parameters:
      {Date}dMin
      setMonthGranularity(): sap.suite.ui.commons.DateRangeSlider
      Set Date Range Slider Granularity to Month
      Returns:
      {sap.suite.ui.commons.DateRangeSlider}this to allow method chaining.
      setPinGrip(bPinGrip)
      Set pinGrip property for the DateRangeSlider
      Parameters:
      {boolean}bPinGrip
      setPinGrip2(bPinGrip2)
      Set pinGrip2 property for the DateRangeSlider
      Parameters:
      {boolean}bPinGrip2
      setShowBubbles(bShowBubbles)
      Set showBubbles property for the DateRangeSlider
      Parameters:
      {boolean}bShowBubbles
      setSmallStepWidth(fSmallStepWidth)
      Set smallStepWidth property for the DateRangeSlider
      Parameters:
      {float}fSmallStepWidth
      setStepLabels(bStepLabels)
      Set stepLabels property for the DateRangeSlider
      Parameters:
      {boolean}bStepLabels
      setTotalUnits(iTotalUnits)
      Set totalUnits property for the DateRangeSlider
      Parameters:
      {int}iTotalUnits
      setValue(dValue)
      Set value property for the DateRangeSlider. This sets the value date for the slider.
      Parameters:
      {Date}dValue
      setValue2(dValue2)
      Set value2 property for the DateRangeSlider. This sets the value2 date for the slider.
      Parameters:
      {Date}dValue2
      setVisible(bVisible)
      Set visible property for the DateRangeSlider
      Parameters:
      {boolean}bVisible
      setWidth(tWidth)
      Set width property for the DateRangeSlider
      Parameters:
      {sap.ui.core.CSSSize}tWidth