Top

class anychart.ui.RangePicker Improve this Doc

Range Picker (only for stock chart).

Methods Overview

Specific settings
decorate()Decorates the container for the range picker.
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

Decorates the container for the range picker.

Params:

Name Type Description
value Element Element to decorate.

Try it:

dispose

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

Try it:

format

Getter for the input and output date time format.

Returns:

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

Params:

Name Type Description
format string Date time format

Returns:

string - Date time format.

Try it:

fromLabelText

Getter for the text for 'from'-label.

Returns:

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

Params:

Name Type Description
value string Value to set.

Returns:

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

Try it:

getElement

Returns the editable DOM element or null if this field.

Returns:

Element - The editable DOM element.

Try it:

render

Renders the range picker.

Params:

Name Type Description
parentElement anychart.charts.Stock | Element Element or stock chart to render the range picker into.

Try it:

target

Sets stock chart for range picker.

Params:

Name Type Description
chart anychart.charts.Stock Stock chart to set.

Try it:

toLabelText

Getter for the text for 'to'-label.

Returns:

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

Params:

Name Type Description
value string Value to set.

Returns:

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

Try it: