Constructor
# new DateTimePickerRangeFieldPresets()
Parameters:
Name | Type | Description |
---|---|---|
props.id |
id of the DOM container |
|
props.choices |
selectable choices, a map of string : dateRange pairs |
|
props.timepicker |
if true the user can select hours and minutes |
|
props.apply |
callback that will be called whenever the state of the component is changed |
|
props.dataNode |
data node |
Extends
Methods
# addListeners()
Listener for on change properties By default is change event for a Input[type=text] field
- Overrides:
# buildDOM()
Builds the DOM representation (view) on initialization
# getChoiceFromDateRange(dateRange) → {string|null}
Finds a choice in the choice picker that is nearly similar to the passed dateRange
Parameters:
Name | Type | Description |
---|---|---|
dateRange |
Object
|
choice id or null
string
|
null
# refresh()
Updates the from and to dates to the current moment
# setDOM()
Updates the component view / DOM representation on state change
# setValue(value)
Set the value to the component
Parameters:
Name | Type | Description |
---|---|---|
value |
Object
|
String
|
Value of the component, dates object or string |