Skip to content

Class: DateRangeProxy

DateRangeProxy is a developer-facing class that provides access to a date range. It is passed to rules to provide access to a date range for application specific customizations

Implements

Summary

Constructors

Properties

Class Properties

Inherited Properties

Currently none inherited from the parent class(es).

Accessors

Class Accessors

Inherited Accessors

Currently none inherited from the parent class(es).

Methods

Class Methods

Currently none in this class.

Inherited Methods

Currently none inherited from the parent class(es).

Constructors

Constructor

+ new DateRangeProxy(dateRange: any): DateRangeProxy

Parameters:

Name Type
dateRange any

Returns: DateRangeProxy

Deprecated

  • obtain an instance of DateRangeProxy via CalendarProxy.getSelectedDateRange() instead

Properties

Protected _dateRange

_dateRange: any

Deprecated

  • use _startDate and _endDate instead

Protected _endDate

_endDate: Date


Protected _startDate

_startDate: Date

Accessors

dateRange

Get Signature

getter

Get the date range

Deprecated
  • use getters for startDate and endDate instead
Returns

any


endDate

Get Signature

getter

Get the end date of date range

Example
// Retrieve the end date of the selected date range
const calendarProxy = context.getPageProxy().getControl('SectionedTable').getSection('CalendarSection');
const dateRangeProxy = calendarProxy.getSelectedDateRange();
console.log(`End date is: ${dateRangeProxy.endDate.toString()}.`);
Returns

Date

End date of date range

Set Signature

setter

Set the end date for the DateRange

Accepted inputs:

  • date string in "yyyy-MM-dd" or "yyyy-MM-ddThh:mm:ss" format

  • JavaScript Date Object.

Example
// Change the end date of the selected date range to today's date
const calendarProxy = context.getPageProxy().getControl('SectionedTable').getSection('CalendarSection');
const dateRangeProxy = calendarProxy.getSelectedDateRange();
const newEndDate = new Date();
dateRangeProxy.endDate = newEndDate;

calendarProxy.setSelectedDateRange(dateRangeProxy);
Parameters
value

any

the end date

Returns

void

Sets the end date of a date range. Accepted inputs: date string in "yyyy-MM-dd" or "yyyy-MM-ddThh:mm:ss" format, or JavaScript Date Object.

Gets the end date of a date range as Date object.

Implementation of IDateRangeProxy.endDate


startDate

Get Signature

getter

Get the start date of date range

Example
// Retrieve the start date of the selected date range
const calendarProxy = context.getPageProxy().getControl('SectionedTable').getSection('CalendarSection');
const dateRangeProxy = calendarProxy.getSelectedDateRange();
console.log(`Start date is: ${dateRangeProxy.startDate.toString()}.`);
Returns

Date

Start date of date range

Set Signature

setter

Set the start date for the DateRange

Accepted inputs:

  • date string in "yyyy-MM-dd" or "yyyy-MM-ddThh:mm:ss" format

  • JavaScript Date Object.

Example
// Change the start date of the selected date range to a specified date
const calendarProxy = context.getPageProxy().getControl('SectionedTable').getSection('CalendarSection');
const dateRangeProxy = calendarProxy.getSelectedDateRange();
const newStartDate = "2025-11-02T00:00:00Z";
dateRangeProxy.startDate = newStartDate;

calendarProxy.setSelectedDateRange(dateRangeProxy);
Parameters
value

any

the start date

Returns

void

Sets the start date of a date range. Accepted inputs: date string in "yyyy-MM-dd" or "yyyy-MM-ddThh:mm:ss" format, or JavaScript Date Object.

Gets the start date of a date range as Date object.

Implementation of IDateRangeProxy.startDate