public class RangeSelector extends AbstractConfigurationObject
| Constructor and Description |
|---|
RangeSelector() |
RangeSelector(Boolean enabled) |
| Modifier and Type | Method and Description |
|---|---|
void |
addButton(RangeSelectorButton button)
Adds button to the buttons array
|
Boolean |
getAllButtonsEnabled() |
ButtonPosition |
getButtonPosition() |
RangeSelectorButton[] |
getButtons() |
Number |
getButtonSpacing() |
Boolean |
getEnabled() |
Number |
getHeight() |
Number |
getInputBoxHeight() |
Number |
getInputBoxWidth() |
String |
getInputDateFormat() |
String |
getInputDateParser() |
String |
getInputEditDateFormat() |
Boolean |
getInputEnabled() |
ButtonPosition |
getInputPosition() |
Number |
getSelected() |
void |
removeButton(RangeSelectorButton button)
Removes first occurrence of button in buttons array
|
void |
setAllButtonsEnabled(Boolean allButtonsEnabled)
Whether to enable all buttons from the start.
|
void |
setButtonPosition(ButtonPosition buttonPosition)
A fixed pixel position for the buttons.
|
void |
setButtons(RangeSelectorButton... buttons)
An array of configuration objects for the buttons.
|
void |
setButtonSpacing(Number buttonSpacing)
The space in pixels between the buttons in the range selector.
|
void |
setEnabled(Boolean enabled)
Enable or disable the range selector.
|
void |
setHeight(Number height)
The height of the range selector, used to reserve space for buttons and
input.
|
void |
setInputBoxHeight(Number inputBoxHeight)
The pixel height of the date input boxes.
|
void |
setInputBoxWidth(Number inputBoxWidth)
The pixel width of the date input boxes.
|
void |
setInputDateFormat(String inputDateFormat)
The date format in the input boxes when not selected for editing.
|
void |
setInputDateParser(String _fn_inputDateParser) |
void |
setInputEditDateFormat(String inputEditDateFormat)
The date format in the input boxes when they are selected for editing.
|
void |
setInputEnabled(Boolean inputEnabled)
Enable or disable the date input boxes.
|
void |
setInputPosition(ButtonPosition inputPosition)
Positioning for the input boxes.
|
void |
setSelected(Number selected)
The index of the button to appear pre-selected.
|
public RangeSelector()
public RangeSelector(Boolean enabled)
public Boolean getAllButtonsEnabled()
setAllButtonsEnabled(Boolean)public void setAllButtonsEnabled(Boolean allButtonsEnabled)
Defaults to: false
public ButtonPosition getButtonPosition()
setButtonPosition(ButtonPosition)public void setButtonPosition(ButtonPosition buttonPosition)
x and y.public Number getButtonSpacing()
setButtonSpacing(Number)public void setButtonSpacing(Number buttonSpacing)
Defaults to: 0
public RangeSelectorButton[] getButtons()
setButtons(RangeSelectorButton...)public void setButtons(RangeSelectorButton... buttons)
An array of configuration objects for the buttons.
Defaults to
buttons: [{
type: 'month',
count: 1,
text: '1m'
}, {
type: 'month',
count: 3,
text: '3m'
}, {
type: 'month',
count: 6,
text: '6m'
}, {
type: 'ytd',
text: 'YTD'
}, {
type: 'year',
count: 1,
text: '1y'
}, {
type: 'all',
text: 'All'
}]
public void addButton(RangeSelectorButton button)
button - to addsetButtons(RangeSelectorButton...)public void removeButton(RangeSelectorButton button)
button - to removesetButtons(RangeSelectorButton...)public Boolean getEnabled()
setEnabled(Boolean)public void setEnabled(Boolean enabled)
Defaults to: true
public Number getHeight()
setHeight(Number)public void setHeight(Number height)
Defaults to: 35
public Number getInputBoxHeight()
setInputBoxHeight(Number)public void setInputBoxHeight(Number inputBoxHeight)
Defaults to: 17
public Number getInputBoxWidth()
setInputBoxWidth(Number)public void setInputBoxWidth(Number inputBoxWidth)
Defaults to: 90
public String getInputDateFormat()
setInputDateFormat(String)public void setInputDateFormat(String inputDateFormat)
%b %e, %Y.
Defaults to: %b %e %Y,
public String getInputDateParser()
public void setInputDateParser(String _fn_inputDateParser)
public String getInputEditDateFormat()
setInputEditDateFormat(String)public void setInputEditDateFormat(String inputEditDateFormat)
Defaults to: %Y-%m-%d
public Boolean getInputEnabled()
setInputEnabled(Boolean)public void setInputEnabled(Boolean inputEnabled)
public ButtonPosition getInputPosition()
setInputPosition(ButtonPosition)public void setInputPosition(ButtonPosition inputPosition)
align, verticalAlign, x and
y.
Defaults to: { align: "right" }
public Number getSelected()
setSelected(Number)public void setSelected(Number selected)
Defaults to: undefined
Copyright © 2025. All rights reserved.