Skip to main content
A newer version of this page is available. .

DateTimePeriod Class

A date-time period that is used to select a predefined range in the Range Filter and Date Filter items.

Declaration

export class DateTimePeriod extends TypedSerializableModel

Remarks

The DateTimePeriod objects are predefined date-time periods in Range Filter and Date Filter items. The RangeFilterItem.dateTimePeriods and DateFilterItem.dateTimePeriods properties provide access to the collections of DateTimePeriod objects.

Use the DateTimePeriod static methods to create a predefined period. To create a custom period, instantiate the DateTimePeriod class and perform the following steps:

Inherited Members

constructor

Initializes a new instance of the DateTimePeriod class.

Declaration

constructor(
    modelJson?: any,
    serializer?: DxDesigner.Analytics.Utils.ModelSerializer
)

Parameters

Name Type Description
modelJson any

A JSON object used for a dashboard deserialization. Do not pass this parameter directly.

serializer DxDesigner.Analytics.Utils.ModelSerializer

An object used for a dashboard deserialization. Do not pass this parameter directly.

Properties

argumentInterval Property

Declaration

argumentInterval: ko.Observable<DateTimeGroupInterval>

Property Value

Type
Observable<DateTimeGroupInterval>

end Property

Declaration

end: LimitContainer

Property Value

Type
LimitContainer

name Property

Specifies the name of the date-time period.

Declaration

name: ko.Observable<string>

Property Value

Type Description
Observable<string>

A string that specifies the name of the date-time period.

Remarks

You can assign the name value to the RangeFilterItem.defaultDateTimePeriodName property to specify the default selected range for the Range Filter.

start Property

Declaration

start: LimitContainer

Property Value

Type
LimitContainer

Methods

format(value) Method

Declaration

format(
    value: Date
): any

Parameters

Name Type
value Date

Returns

Type
any

getDateFormat Method

Declaration

getDateFormat(): string

Returns

Type
string

getDateTimeValue Method

Declaration

getDateTimeValue(): IRange

Returns

Type
IRange

getInfo Method

For internal use.

Declaration

getInfo(): DxDesigner.Analytics.Utils.ISerializationInfoArray

Returns

Type Description
DxDesigner.Analytics.Utils.ISerializationInfoArray