AnyChart
API Reference
Still have questions?
Contact support
Top

class anychart.ui.RangePicker Improve this Doc

The RangePicker class contains methods for configuring range picker.

Methods Overview

Specific settings
decorate()Adds a Range Picker to a specified DOM container.
format()Date time format.
render()Renders the range picker.
target()Sets stock chart for range picker.
'From' text settings
fromLabelText()'From' label text settings.
'To' text settings
toLabelText()'To' label text settings.
Miscellaneous
dispose()Disposes range picker.
getElement()Returns the editable DOM element or null if this field.

Methods Description

decorate

Adds a Range Picker to a specified DOM container.

Params:

NameTypeDescription
valueElementDOM element.

dispose

Disposes range picker.
Removes it from parent layer, nulls links, removes from DOM.

format

Getter for the input and output date time format.

Returns:

string - Output date time format.
See listing
var rangePicker = anychart.ui.rangePicker();
var format = rangePicker.format();
Setter for the input and output date time format.

Params:

NameTypeDescription
formatstringDate time format

Returns:

string - Date time format.

fromLabelText

Getter for the text for 'from'-label.

Returns:

string - Text for 'from'-label.
See listing
var fromLabelText = rangePicker.fromLabelText();
Setter for the text for 'from'-label.

Params:

NameTypeDescription
textstringLabel text to set.

Returns:

anychart.ui.RangePicker - Self instance for method chaining.

getElement

Returns the editable DOM element or null if this field.

Returns:

Element - The editable DOM element.

render

Renders the range picker.

Params:

NameTypeDescription
parentElementanychart.charts.Stock | ElementElement or stock chart to render the range picker into.

target

Sets stock chart for range picker.

Params:

NameTypeDescription
chartanychart.charts.StockStock chart to set.

toLabelText

Getter for the text for 'to'-label.

Returns:

string - The text for 'to'-label.
See listing
var toLabelText = rangePicker.toLabelText();
Setter for the text for 'to'-label.

Params:

NameTypeDescription
textstringLabel text to set.

Returns:

anychart.ui.RangePicker - Self instance for method chaining.