sap.suite.ui.commons.DateRangeScroller.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.suite.ui.commons.DateRangeScroller 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 |
Returns a metadata object for class sap.suite.ui.commons.DateRangeScroller.
Returns:
Parameters:
{string|sap.ui.core.Control} | vAriaDescribedBy | Id of a ariaDescribedBy which becomes an additional target of this ariaDescribedBy association. Alternatively, a ariaDescribedBy instance may be given. |
Returns:
Parameters:
{string|sap.ui.core.Control} | vAriaLabelledBy | Id of a ariaLabelledBy which becomes an additional target of this ariaLabelledBy association. Alternatively, a ariaLabelledBy instance may be given. |
Returns:
Attach event handler
fnFunction
to the 'change' event of this
sap.suite.ui.commons.DateRangeScroller
.
. When called, the context of the event handler (its
this
) will be bound to
oListener if specified otherwise to this sap.suite.ui.commons.DateRangeScroller
.
itself. This event is fired whenever the date range is changed.
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.DateRangeScroller . itself. |
Returns:
Decrement the date range by a time period increment according to the the date range type and fire the dateChange event.
Returns:
Detach event handler
fnFunction
from the 'change' event of this
sap.suite.ui.commons.DateRangeScroller
.
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:
Fire event change to attached listeners.
Expects following event parameters:
- 'dateRange' of type
any
Object containing startDate and endDate Date properties signifying the start and ending dates of the currently selected range.
Parameters:
{Map} | mArguments? | the arguments to pass along with the event. |
Returns:
getAriaDescribedBy(): string[]
Association to controls / ids which describe this control (see WAI-ARIA attribute aria-describedby).
Returns:
getAriaLabelledBy(): string[]
Association to controls / ids which label this control (see WAI-ARIA attribute aria-labelledby).
Returns:
getDateRange()
Returns an object containing startDate and endDate set to the current start and end Date objects.
Increment the date range by a time period increment according to the the date range type and fire the dateChange event.
Returns:
removeAllAriaDescribedBy(): string[]
Returns:
{string[]} | an array with the ids of the removed elements (might be empty) |
removeAllAriaLabelledBy(): string[]
Returns:
{string[]} | an array with the ids of the removed elements (might be empty) |
removeAriaDescribedBy(vAriaDescribedBy): string
Parameters:
{int|string|sap.ui.core.Control} | vAriaDescribedBy | the ariaDescribedBy to remove or its index or id |
Returns:
{string} | the id of the removed ariaDescribedBy or null |
removeAriaLabelledBy(vAriaLabelledBy): string
Parameters:
{int|string|sap.ui.core.Control} | vAriaLabelledBy | the ariaLabelledBy to remove or its index or id |
Returns:
{string} | the id of the removed ariaLabelledBy or null |
setDateFormat(oDateFormat)
Setter for dateFormat which is used for formating the dates If passed object is null or is of incorrect type, control's default formatting will be used.
Parameters:
Set a custom date range beginning with the specified start date that increments/decrements iDuration
days at a time.
Parameters:
| dInitialDate | The initial date for the custom range. |
| [iDuration=current custom duration] | The number of days in the custom range, including the start date. |
Returns:
Set a date range equal to a single day, starting with the given initial date.
Parameters:
{Date} | dInitialDate | The initial date. |
Returns:
Set a date range that increments/decrements one calendar month at a time. The month date range begins on the first day of the month (beginning of the day) and ends on the last day of the month (end of the day).
Parameters:
{Date} | dInitialDate | Any date that falls within the desired month. |
Returns:
Set a date range that steps one week at a time. The starting date is set according to the first day of the week (default is Monday) and the initial date. For example, if the first day of the week is set to Tuesday and the initial date is Wednesday, January 9, 2013, then the starting date will be Tuesday, January 8, 2013.
The last day of the range is calculated by adding (duration - 1) days to the starting date.
Parameters:
{Date} | dInitialDate | Any date that falls on the desired week. Start/end dates will be adjusted according to the first day of the week. |
{Object} | oSettings? | |
| oSettings.duration?, Default: 7 | The number of days in the range with a minimum of 1 and maximum of 7. |
| oSettings.iFirstDayOfWeek?, Default: 1 | The starting day for the range. Valid values are 0-6, with 0=Sunday and 6=Saturday. |
Returns:
Set a date range that increments/decrements one calendar year at a time. The year date range begins on the first day of the year (beginning of the day) and ends on the last day of the year (end of the day).
Parameters:
{Date} | dInitialDate | Any date that falls within the desired year. |
Returns: