Skip to main content

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

Inheritance

constructor

Initializes a new instance of the DateTimePeriod class.

Declaration

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

Parameters

Name Type Description
modelJson any

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

serializer ModelSerializer

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

Properties

argumentInterval Property

Declaration

argumentInterval: ko.Observable<DevExpress.Dashboard.Model.DateTimeGroupInterval>

Property Value

Type
Observable<DateTimeGroupInterval>

end Property

Declaration

end: DevExpress.Dashboard.Model.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: DevExpress.Dashboard.Model.LimitContainer

Property Value

Type
LimitContainer

Methods

format(value) Method

Declaration

format(
    value: Date
): string

Parameters

Name Type
value Date

Returns

Type
string

getDateFormat Method

Declaration

getDateFormat(): DevExpress.Dashboard.Internal.Data.DateTimeFormatInfoType

Returns

Type
DateTimeFormatInfoType

getDateTimeValue Method

Declaration

getDateTimeValue(): DevExpress.Dashboard.Internal.Viewer.IRange

Returns

Type
IRange

getInfo Method

For internal use.

Declaration

getInfo(): DevExpress.Analytics.Utils.ISerializationInfoArray

Returns

Type Description
ISerializationInfoArray

An array of objects that provide serialization info.