Class DateRangePicker
- All Implemented Interfaces:
Animatable<DateRangePicker>
,CanDrop<DateRangePicker>
,Clickable<DateRangePicker>
,SupportAppend<DateRangePicker>
,SupportHelpIcon<DateRangePicker>
,SupportPlaceholder<DateRangePicker>
,Draggable<DateRangePicker>
,Editable<DateRangePicker>
,Focusable<DateRangePicker>
,HandleHotKey<DateRangePicker>
,HandleKeyboardEvents<DateRangePicker>
,HandleMouseEvents<DateRangePicker>
,Touchable<DateRangePicker>
Date range picker form item>
This component allows the user to pick a date range. The component guarantees that only valid date ranges can be picked (correctly formatted, has valid maximum and minimum dates and the minimum date is less or equal to the maximum date).
The component displays an input field for the user, that when clicked, will open two dropdown calendars. The left side calendar will allow the user to pick a starting date, the right side calendar will allow the user to pick the ending date. The user can also type in a date, but if it is not in the correct format, the component will revert back to its default value.
The component also allows the use of predefined date ranges, which the user can chose by its name (Previous month, week etc).
This makes it easier for the user to input frequently used date ranges. These predefined ranges can be added by using the
addPredefinedRange(java.lang.String, java.lang.String, java.util.Date, java.util.Date)
method.
Supported events:
AnimatinStart
AnimationEnd
,
Focus
FocusOut
FocusIn
LosesFocus
copy
cut
EnterPressed
input
paste
Click
,
DoubleClick
,
MouseDown
,
MouseDown
,
MouseLeave
,
MouseMove
,
MouseOver
,
MouseOut
,
MouseUp
,
Wheel
,
KeyPress
,
KeyUp
,
KeyDown
,
TouchCancel
,
TouchEnd
,
TouchMove
,
TouchStart
,
Drop
,
DragStart
,
DragEnd
HotKey
- Since:
- 4.0
- Author:
- JBStrap
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected DropDownPosition
protected Date
protected Date
protected boolean
protected boolean
Fields inherited from class com.jbstrap.ui.components.form.FormItem
appends, clearButton, column, defaultState, defaultValue, description, formItemSize, helpIcon, label, labelPosition, labelSizes, modified, originalValue, params, prepends, required, showLabel, state, tabIndex, value, visible
Fields inherited from class com.jbstrap.ui.Component
animation, attributes, backgroundColor, borderColor, color, defaultHotKeyHandler, handlers, hotKeys, styleClasses, textAlign, toolTip, toolTipPosition
-
Constructor Summary
ConstructorDescriptionDateRangePicker
(DataDescriptorColumn column) Creates a date range picker, based on the specified DataDescriptor column.DateRangePicker
(DataDescriptorColumn column, String language) Creates a date range picker, based on the specified DataDescriptor column, with the specified language code.DateRangePicker
(String name, String label) Creates a date range picker, with the specified name and titleDateRangePicker
(String name, String label, String language) Creates a date range picker, with the specified name, title and language codeDateRangePicker
(String name, String label, String language, String dateFormat) Creates a date range picker, with the specified name, title and language code. -
Method Summary
Modifier and TypeMethodDescriptionaddPredefinedRange
(PredefinedRange<Date> range) Adds a predefined range to the componentaddPredefinedRange
(String name, String title, Date minValue, Date maxValue) Adds a predefined date range to the componentfinal DateRangePicker
addPredefinedRanges
(PredefinedRange<Date>... ranges) Adds multiple predefined ranges to the componentaddPredefinedRanges
(List<PredefinedRange<Date>> ranges) Adds multiple predefined ranges to the componentvoid
The operations to be executed after the drawing of the componentvoid
drawEditor
(StringWriter writer) Draws the editor component.Gets the component's date formatGets the position of the dropdown menu.Gets the name of the column, that stores the range maximum value.final Date
Gets the maximum dateGets the name of the column, that stores the range minimum value.final Date
Gets the minimum dateGets the predefined ranges that are assigned to the componentvoid
init()
The component initialization method.boolean
Determines if the dropdown menu is enabled or not.void
Removes all predefined ranges from the componentremovePredefinedRange
(PredefinedRange<Date> range) Removes the specified predefined range from the componentremovePredefinedRange
(String name) Removes the specified predefined range from the componentremovePredefinedRanges
(PredefinedRange<Date>... ranges) Removes the specified predefined ranges from the componentremovePredefinedRanges
(String... names) Removes the specified predefined ranges from the componentremovePredefinedRanges
(List<PredefinedRange<Date>> ranges) Removes the specified predefined ranges from the componentsetDateFormat
(String dateFormat) Sets the component's date formatsetDefaultValue
(Object defaultValue) Sets the form item’s default value.setDropDownPosition
(DropDownPosition position) Sets the position of the dropdown menu.setEnabled
(boolean enabled) Sets the date range picker to be enabled.final DateRangePicker
setMaximumDate
(Date maxDate) Sets the maximum date.final DateRangePicker
setMinimumDate
(Date minDate) Sets the minimum date.setObjectValue
(Object value) Sets the form item’s current value using the object in the parameter.setOriginalObjectValue
(Object value) Sets the form item’s original value using the object in the parameter.setOriginalValue
(DateRange originalValue) Sets the form item’s original value to the specified value.setReadOnly
(boolean readOnly) Sets the date range picker to read-only mode.setShowDropdowns
(boolean show) Sets if the dropdown menu is enabled or not.Sets the date range picker's form item valueMethods inherited from class com.jbstrap.ui.components.form.FormItem
_addComponent, _setReverseShow, _setState, addComponent, addRecalcOnChangeColumn, addRecalcOnChangeColumns, addRecalcOnChangeColumns, addValueChangeHandler, clearValue, convertValueToJavaScript, convertValueToJavaScript, drawComponent, enableClearButton, eraseValue, getCalculateValue, getColumn, getComponents, getDataType, getDefaultState, getDescription, getFormItemSize, getLabel, getLabelPosition, getLabelSize, getLabelSize, getName, getOriginalValue, getParam, getParamAsBoolean, getParamAsDate, getParamAsDate, getParamAsDouble, getParamAsInteger, getParamAsLong, getParamAsNumber, getParamAsString, getRecalcOnChangeColumnsList, getState, getTabIndex, getValue, getValueAsBoolean, getValueAsDate, getValueAsDouble, getValueAsFloat, getValueAsInteger, getValueAsLong, getValueAsString, isAssignable, isAutoCalculate, isModified, isReadOnly, isRequired, isReverseShow, isShowLabel, isVisible, onHotKeyEventHandler, onShow, redraw, removeParam, resetState, runAfterDrawOnAddon, runOnHideOnAddon, runOnShowOnAddon, setCalculateValue, setDataType, setDataType, setDescription, setFocus, setFormItemSize, setLabel, setLabelPosition, setLabelSize, setLabelSize, setMargin, setModified, setPadding, setParam, setParams, setRequired, setShowLabel, setState, setTabIndex, setVisible, triggerFormChange, writeHTML
Methods inherited from class com.jbstrap.ui.Component
_hide, _setAttribute, addAllowedRole, addComponent, addComponents, addDeniedRole, addHandler, addStyle, addStyleClass, addStyleClasses, clearfix, closeTag, combinateAccess, containsStyle, containsStyleClass, draw, drawSubComponents, error, flattendComponentTree, getAccess, getAccessMode, getAllowedRoles, getAttribute, getAttributes, getBackgroundColor, getBorderColor, getClient, getComponentById, getComponents, getComponentsByClass, getData, getDeniedRoles, getHandlers, getId, getLanguageCode, getParent, getParent, getRegisteredEvents, getStyle, getStyleClasses, getTextAlign, getTextColor, getToolTip, getToolTipPosition, getTypeName, getUI, insertComponentAfter, insertComponentBefore, isAccess, isDrawn, isEnabled, isEventBubbling, onHide, openTag, removeAllComponents, removeAllowedRole, removeAllStyleClasses, removeAttribute, removeComponent, removeComponent, removeComponents, removeDeniedRole, removeHandler, removeStyle, removeStyle, removeStyleClass, removeStyleClasses, replaceComponent, replaceStyleClass, runAfterDraw, runJavaScript, runJavaScript, runJavaScript, runOnHide, runOnShow, say, setAttribute, setBackgroundColor, setBorder, setBorderColor, setData, setDisplayType, setEventBubbling, setFlex, setFloating, setHeight100, setHeight25, setHeight50, setHeight75, setHeightAuto, setLanguage, setName, setOverflow, setParent, setScrollable, setSelectionType, setShadow, setStyle, setTextAlign, setTextColor, setToolTip, setToolTipPosition, setWidth100, setWidth25, setWidth50, setWidth75, setWidthAuto, showNotification, showNotification, showProcessIndicator, toggleStyleClass
Methods inherited from class com.jbstrap.core.messagebus.MessageBus
closeMessageBus, messageBusOpened, openMessageBus, renewSubscription, sendMessageToMessageBus, subscribeMessageBus, unsubscribeAllListeners, unsubscribeMessageBus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.jbstrap.ui.Animatable
addAnimationEndHandler, addAnimationStartHandler, getAnimation, removeAnimation, setAnimation
Methods inherited from interface com.jbstrap.ui.CanDrop
addDropEventHandler
Methods inherited from interface com.jbstrap.ui.Clickable
addClickHandler, addDoubleClickHandler
Methods inherited from interface com.jbstrap.ui.Draggable
addDragEndEventHandler, addDragStartEventHandler, setDraggable
Methods inherited from interface com.jbstrap.ui.Editable
addCopyHandler, addCutHandler, addEnterPressedHandler, addInputHandler, addPasteHandler
Methods inherited from interface com.jbstrap.ui.Focusable
addFocusHandler, addFocusInHandler, addFocusOutHandler, addLosesFocusHandler, setFocus
Methods inherited from interface com.jbstrap.ui.HandleHotKey
addHotKey, addHotKey, removeHotKey, removeHotKeys
Methods inherited from interface com.jbstrap.ui.HandleKeyboardEvents
addKeyDownHandler, addKeyPressHandler, addKeyUpHandler
Methods inherited from interface com.jbstrap.ui.HandleMouseEvents
addMouseDownHandler, addMouseEnterHandler, addMouseLeaveHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler
Methods inherited from interface com.jbstrap.ui.components.form.SupportAppend
append, append, append, prepend, prepend, prepend, removeAppend, removePrepend
Methods inherited from interface com.jbstrap.ui.components.form.SupportHelpIcon
getHelpIcon, getHelpText, setHelpIcon, setHelpText
Methods inherited from interface com.jbstrap.ui.components.form.SupportPlaceholder
getPlaceholder, setPlaceholder
Methods inherited from interface com.jbstrap.ui.Touchable
addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler
-
Field Details
-
minDate
-
maxDate
-
dateFormat
-
dropDownPosition
-
showDropdowns
protected boolean showDropdowns -
useTime
protected boolean useTime
-
-
Constructor Details
-
DateRangePicker
Creates a date range picker, with the specified name and title- Parameters:
name
- The name of the date pickerlabel
- The label of the date picker. Ifnull
, no label will be used- Throws:
NullPointerException
- If the name isnull
-
DateRangePicker
Creates a date range picker, with the specified name, title and language code- Parameters:
name
- The name of the date pickerlabel
- The label of the date picker. Ifnull
, no label will be usedlanguage
- Language code according to which the component is created. If not specified or null is set, the framework’s default language code is used. The default language of the framework is set via the JBStrap parameterJBStrapParamType.DEFAULT_LANGUAGE
- Throws:
NullPointerException
- If the name isnull
-
DateRangePicker
Creates a date range picker, with the specified name, title and language code. The date format can also be specified.- Parameters:
name
- The name of the date pickerlabel
- The label of the date picker. Ifnull
, no label will be usedlanguage
- Language code according to which the component is created. If not specified or null is set, the framework’s default language code is used. The default language of the framework is set via the JBStrap parameterJBStrapParamType.DEFAULT_LANGUAGE
dateFormat
- The date format that will be used by the component. If not specified ornull
, the framework's default format will be used. The framework's default format can be set via theJBStrapParamType.DATE_FORMAT
JBStrap parameter- Throws:
NullPointerException
- If the name isnull
-
DateRangePicker
Creates a date range picker, based on the specified DataDescriptor column.The method creates and sets the date range picker, based on the DataDescriptor column, specified in the parameters. The following parameters from the DataDescriptor column are used:
DataDescriptorColumn.getTitle
- The title set in the DataDescriptor column will be used by the input field as its label.DataDescriptorColumn.isNullable()
- If the field can anull
value, the field will be marked as not mandatory. If it cannot have anull
value, the field will be marked as mandatory.MetaParamName.DATE_FORMAT
- The date format to be used when displaying a date. If not specified, the default format will be used, which can be specified using theJBStrapParamType.DATE_FORMAT
andJBStrapParamType.DATETIME_FORMAT
JBStrap parameters.MetaParamName.PLACEHOLDER
- This text will be used as a placeholder.MetaParamName.SIZE
- The value specified here defines the size of the input field. (Applicable values: SMALL, MEDIUM, LARGE)MetaParamName.STATE
- The value specified here defines the state of the input field. (Applicable values: DEFAULT, ERROR, WARNING, SUCCESS, INFO)MetaParamName.DEFAULT_VALUE
- The value specified here defines the field's default value. The value must have the type of field, in this case, it must be a boolean value.MetaParamName.READ_ONLY
- Iftrue
, the field will be read only. Otherwise, the field can have its contents modified by the user.MetaParamName.ENABLED
- Iffalse
, the field will be disabled (it will be created in an unusable state.) Otherwise, the field will be enabled when created.MetaParamName.HELP
- If the parameter is specified, an icon will be displayed next to the field. If the user moves over the icon, the text specified here will be displayed, as a help text.MetaParamName.HELP_ICON
- If the icon name is specified (from theIcon
enum), then this icon will replace the default "?" icon.MetaParamName.DESCRIPTION
- The text specified here will appear below the field, in a smaller, italic font.MetaParamName.TAB_INDEX
- The value specified here determines the order of the input focus (when the user presses the Tab key). The order goes in ascending order. If not specified, the component will use the order value from the DataDescriptor. If that not specified either, the order in which it was placed in the DataDescriptor will be used.MetaParamName.SHOW_DROPDOWN
- This parameter determines, if the user can see the dropdown menu, allowing the user to choose from the years and months. By default, this is enabled. If specified as false, the user won't be able to use this dropdown menu. The user can only use the buttons above the calendar, to change the monthsMetaParamName.PREDEFINED_RANGES
- Predefined ranges can be added to the component through this parameter. More than one can be added, by listing them here. The usable range names can be found in thePredefinedDateRange
enum, including the custom range(s)MetaParamName.MIN_COLUMN
- The column that holds minimum range value can be specified in this parameter. If specified, the component will store the minimum value in this column. * The maximum value (if the MAX_COLUMN is not specified) will be stored in the column, on which the component was built from. If neither the MIN_COLUMN or MAX_COLUMN parameter is specified, the values will be stored in a column, that has the same name, but with a postfix. The starting date postfix is "_startDate", the ending date postfix is "_endDate"MetaParamName.MAX_COLUMN
- The column that holds maximum range value can be specified in this parameter. If specified, the component will store the maximum value in this column. * The minimum value (if the MIN_COLUMN is not specified) will be stored in the column, on which the component was built from. If neither the MIN_COLUMN or MAX_COLUMN parameter is specified, the values will be stored in a column, that has the same name, but with a postfix. The starting date postfix is "_startDate", the ending date postfix is "_endDate"
- Parameters:
column
- The DataDescriptor column, that will be used as a basis for the form item- Throws:
NullPointerException
- If the column isnull
- See Also:
-
DateRangePicker
Creates a date range picker, based on the specified DataDescriptor column, with the specified language code.The method creates and sets the date range picker, based on the DataDescriptor column, specified in the parameters. The following parameters from the DataDescriptor column are used:
DataDescriptorColumn.getTitle
- The title set in the DataDescriptor column will be used by the input field as its label.DataDescriptorColumn.isNullable()
- If the field can anull
value, the field will be marked as not mandatory. If it cannot have anull
value, the field will be marked as mandatory.MetaParamName.DATE_FORMAT
- The date format to be used when displaying a date. If not specified, the default format will be used, which can be specified using theJBStrapParamType.DATE_FORMAT
andJBStrapParamType.DATETIME_FORMAT
JBStrap parameters.MetaParamName.PLACEHOLDER
- This text will be used as a placeholder.MetaParamName.SIZE
- The value specified here defines the size of the input field. (Applicable values: SMALL, MEDIUM, LARGE)MetaParamName.STATE
- The value specified here defines the state of the input field. (Applicable values: DEFAULT, ERROR, WARNING, SUCCESS, INFO)MetaParamName.DEFAULT_VALUE
- The value specified here defines the field's default value. The value must have the type of field, in this case, it must be a boolean value.MetaParamName.READ_ONLY
- Iftrue
, the field will be read only. Otherwise, the field can have its contents modified by the user.MetaParamName.ENABLED
- Iffalse
, the field will be disabled (it will be created in an unusable state.) Otherwise, the field will be enabled when created.MetaParamName.HELP
- If the parameter is specified, an icon will be displayed next to the field. If the user moves over the icon, the text specified here will be displayed, as a help text.MetaParamName.HELP_ICON
- If the icon name is specified (from theIcon
enum), then this icon will replace the default "?" icon.MetaParamName.DESCRIPTION
- The text specified here will appear below the field, in a smaller, italic font.MetaParamName.TAB_INDEX
- The value specified here determines the order of the input focus (when the user presses the Tab key). The order goes in ascending order. If not specified, the component will use the order value from the DataDescriptor. If that not specified either, the order in which it was placed in the DataDescriptor will be used.MetaParamName.SHOW_DROPDOWN
- This parameter determines, if the user can see the dropdown menu, allowing the user to choose from the years and months. By default, this is enabled. If specified as false, the user won't be able to use this dropdown menu. The user can only use the buttons above the calendar, to change the monthsMetaParamName.PREDEFINED_RANGES
- Predefined ranges can be added to the component through this parameter. More than one can be added, by listing them here. The usable range names can be found in thePredefinedDateRange
enum, including the custom range(s)MetaParamName.MIN_COLUMN
- The column that holds minimum range value can be specified in this parameter. If specified, the component will store the minimum value in this column. * The maximum value (if the MAX_COLUMN is not specified) will be stored in the column, on which the component was built from. If neither the MIN_COLUMN or MAX_COLUMN parameter is specified, the values will be stored in a column, that has the same name, but with a postfix. The starting date postfix is "_startDate", the ending date postfix is "_endDate"MetaParamName.MAX_COLUMN
- The column that holds maximum range value can be specified in this parameter. If specified, the component will store the maximum value in this column. * The minimum value (if the MIN_COLUMN is not specified) will be stored in the column, on which the component was built from. If neither the MIN_COLUMN or MAX_COLUMN parameter is specified, the values will be stored in a column, that has the same name, but with a postfix. The starting date postfix is "_startDate", the ending date postfix is "_endDate"
- Parameters:
column
- The DataDescriptor column, that will be used as a basis for the form itemlanguage
- Language code according to which the component is created. If not specified or null is set, the framework’s default language code is used. The default language of the framework is set via the JBStrap parameterJBStrapParamType.DEFAULT_LANGUAGE
- Throws:
NullPointerException
- If the column isnull
- See Also:
-
-
Method Details
-
init
Description copied from class:Component
The component initialization method.Empty method, only needs to be overwritten when making a custom component, that needs to call an initializing JavaScript on the client side. The method is called by the framework after the component is drawn, but before the afterDraw() method. The use of this method during application development is not allowed. This method is meant for inner use only.
- Overrides:
init
in classFormItem<DateRange,
DateRangePicker> - Throws:
JavaScriptLoadError
- If there was a JavaScript error during the initialization.
-
drawEditor
Description copied from class:FormItem
Draws the editor component.
You do not need to use this method during development, but all components extending the form item must implement it. Use the method to generate the input field’s HTML code. This code is then inserted into the corresponding DOM code when drawing the form item.
- Specified by:
drawEditor
in classFormItem<DateRange,
DateRangePicker> - Parameters:
writer
- The HTML string writer class instance; write here the HTML code for the input field
-
setDateFormat
Sets the component's date format- Parameters:
dateFormat
- The date format to be used. Ifnull
, the default date format will be used. The framework's default date format can be set via theJBStrapParamType.DATE_FORMAT
parameter- Returns:
- The date range picker component
-
getDateFormat
Gets the component's date format- Returns:
- The date format to be used.
-
setMinimumDate
Sets the minimum date. If specified, the user cannot pick an earlier date. If the user manually inputs a date earlier than the specified minimum date, the date will be automatically modified to the minimum date.- Parameters:
minDate
- The minimum date- Returns:
- The date rage picker component
-
getMinimumDate
Gets the minimum date- Returns:
- The minimum date or
null
, if no minimum date was specified
-
setMaximumDate
Sets the maximum date. If specified, the user cannot pick a later date. If the user manually inputs a date later than the specified maximum date, the date will be automatically modified to the maximum date.- Parameters:
maxDate
- The maximum date- Returns:
- The date range picker component
-
getMaximumDate
Gets the maximum date- Returns:
- The maximum date or
null
, if no maximum date was specified
-
setDropDownPosition
Sets the position of the dropdown menu. By default, it appears on the left side of the input field- Parameters:
position
- The position of the dropdown calendar. Ifnull
, it will use the default position- Returns:
- The date range picker component
-
getDropDownPosition
Gets the position of the dropdown menu.- Returns:
- The position of the dropdown calendar.
-
setShowDropdowns
Sets if the dropdown menu is enabled or not. By default, it is enabled.- Parameters:
show
- Iftrue
, the user can select the years and months through the dropdown menus. Iffalse
, the user can only go forwards or backwards through the months- Returns:
- The date range picker component
-
isShowDropdowns
public boolean isShowDropdowns()Determines if the dropdown menu is enabled or not.- Returns:
- If
true
, the user can select the years and months through the dropdown menus. Iffalse
, the user can only go forwards or backwards through the months
-
getMinColumnName
Gets the name of the column, that stores the range minimum value.- Returns:
- The name of the column
-
getMaxColumnName
Gets the name of the column, that stores the range maximum value.- Returns:
- The name of the column
-
addPredefinedRange
Adds a predefined date range to the component- Parameters:
name
- The name of the range, must be unique within the componenttitle
- The title of the range, that will appear on the interfaceminValue
- The minimum value of the rangemaxValue
- The maximum value of the range- Returns:
- The date range picker component
- Throws:
NullPointerException
- If the name, minimum or maximum value isnull
IllegalArgumentException
- If the name is already in use or the minimum value is greater than the maximum value (the range is invalid)
-
addPredefinedRange
Adds a predefined range to the component- Parameters:
range
- The POJO class, containing the predefined range's data- Returns:
- The date range picker component
- Throws:
IllegalArgumentException
- If the name is already in use or the minimum value is greater than the maximum value (the range is invalid)
-
addPredefinedRanges
Adds multiple predefined ranges to the component- Parameters:
ranges
- A list containing the predefined ranges- Returns:
- The date range picker component
- Throws:
IllegalArgumentException
- If the name is already in use or the minimum value is greater than the maximum value (the range is invalid)
-
addPredefinedRanges
Adds multiple predefined ranges to the component- Parameters:
ranges
- The predefined ranges to be added- Returns:
- The date range picker component
- Throws:
IllegalArgumentException
- If the name is already in use or the minimum value is greater than the maximum value (the range is invalid)
-
removePredefinedRange
Removes the specified predefined range from the component- Parameters:
name
- The name of the range to be removed. If the name is not found, the method won't do anything- Returns:
- The date range picker component
-
removePredefinedRanges
Removes the specified predefined ranges from the component- Parameters:
names
- The names of the ranges to be removed. If one of them are not found, the method will ignore it- Returns:
- The date range picker component
-
removePredefinedRange
Removes the specified predefined range from the component- Parameters:
range
- The POJO class that describes the range- Returns:
- The date range picker component
-
removePredefinedRanges
Removes the specified predefined ranges from the component- Parameters:
ranges
- The POJO classes describing the predefined ranges- Returns:
- The date range picker component
-
removePredefinedRanges
Removes the specified predefined ranges from the component- Parameters:
ranges
- A list containing the predefined ranges to be removed- Returns:
- The date range picker component
-
removeAllPredefinedRanges
Removes all predefined ranges from the component- Returns:
- The date range picker component
-
getPredefinedRanges
Gets the predefined ranges that are assigned to the component- Returns:
- A list containing the predefined ranges that are assigned to the component. If there are none, the list will be empty
-
afterDraw
public void afterDraw()Description copied from class:Component
The operations to be executed after the drawing of the componentBy default, this is an empty method. It has to be overwritten on a component or page if additional operations have to be executed after the drawing process. One such operation is data retrieval, which shouldn't run in constructors so that the user could see results of an operation or navigation process.
- Overrides:
afterDraw
in classFormItem<DateRange,
DateRangePicker>
-
setValue
Sets the date range picker's form item value- Overrides:
setValue
in classFormItem<DateRange,
DateRangePicker> - Parameters:
value
- The component value- Returns:
- Form item component
-
setOriginalValue
Description copied from class:FormItem
Sets the form item’s original value to the specified value.- Overrides:
setOriginalValue
in classFormItem<DateRange,
DateRangePicker> - Parameters:
originalValue
- The form item’s original value- Returns:
- Form item component
-
setObjectValue
Description copied from class:FormItem
Sets the form item’s current value using the object in the parameter.- Overrides:
setObjectValue
in classFormItem<DateRange,
DateRangePicker> - Parameters:
value
- The object whose value is passed to the form item- Returns:
- Form item component
-
setOriginalObjectValue
Description copied from class:FormItem
Sets the form item’s original value using the object in the parameter.- Overrides:
setOriginalObjectValue
in classFormItem<DateRange,
DateRangePicker> - Parameters:
value
- The object whose value is passed to the form item as an original value- Returns:
- Form item component
-
setDefaultValue
Description copied from class:FormItem
Sets the form item’s default value. By default, the form item does not have a default value.- Specified by:
setDefaultValue
in classFormItem<DateRange,
DateRangePicker> - Parameters:
defaultValue
- Form item default value- Returns:
- Form item component
-
onFormItemValueChanged
- Overrides:
onFormItemValueChanged
in classFormItem<DateRange,
DateRangePicker> - Parameters:
event
- Form item value change event handler
-
setReadOnly
Sets the date range picker to read-only mode. By default, the date range picker is displayed as writable and the user can freely modify the form item value. If the component is set to read-only mode, the user is unable to modify the date range picker value.- Overrides:
setReadOnly
in classFormItem<DateRange,
DateRangePicker> - Parameters:
readOnly
- Iftrue
is set, the date range picker is switched to read-only mode and the user is unable to modify the value. Iffalse
is set, the date range picker is switched to writable mode and the user is able to modify form item value.- Returns:
- Date range picker component
-
setEnabled
Sets the date range picker to be enabled. Defaults totrue
- Overrides:
setEnabled
in classFormItem<DateRange,
DateRangePicker> - Parameters:
enabled
-true
, the component is enabled, otherwise it's disabled- Returns:
- Date range picker component
-