WbkCategoryView.getPeriodStartDataPicker

Syntax

getPeriodStartDataPicker();

Description

The getPeriodStartDataPicker method returns date and time editor of time series display period start.

Comments

This method returns value of the PP.Ui.DateTimePicker.

Example

To execute the example, the HTML page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component). Define a new period of time series displaying, change labels for date editors used to enter start and end dates of series display period:

// Get tool ribbon
var ribbon = workbookBox.getRibbonView();
// Get the Home tool ribbon category
var mainCategory = ribbon.getMainCategory();
// Get start and end date editors in the Display Period area
var startDataPicker = mainCategory.getPeriodStartDataPicker();
var endDataPicker = mainCategory.getPeriodEndDataPicker();
// Set new start and end dates of time series display period
startDataPicker.setValue(new Date(1999, 0, 01));
endDataPicker.setValue(new Date(2012, 11, 31));
// Get text for start and end date editors of series display period
var startLabel = mainCategory.getPeriodStartLabel();
var endLabel = mainCategory.getPeriodEndLabel();
// Change texts
startLabel.setContent("From:");
endLabel.setContent("To:");

After executing the example the time series displaying period is set between 01.01.1999 and 31.12.2012, and the labels for the date editors Start: and End: are replaced with From: and To: respectively:

Now refresh the Display Period panel in the workbook ribbon:

mainCategory.refreshPeriodPanel();

After the specified script line is executed, the corresponding date and time editors show the first and the last dates available in the current data source:

See also:

WbkCategoryView