public class DateField extends TriggerField<Date> implements ExpandEvent.HasExpandHandlers, CollapseEvent.HasCollapseHandlers
DatePicker
dropdown and automatic
date validation.Field.FieldStyles
impl
forceInvalidText, hasFocus, name, originalValue, parseError, preventMark, validationTask
valueUpdater
adjustSize, allowTextSelection, cacheSizes, disableContextMenu, disabled, disabledStyle, ensureVisibilityOnSizing, height, hidden, lastSize, layer, left, mask, maskMessage, monitorWindowResize, pageX, pageY, resizeHandler, shim, tabIndex, toolTip, toolTipConfig, top, width, windowResizeDelay, windowResizeTask
Constructor and Description |
---|
DateField()
Creates a new date field.
|
DateField(DateCell cell)
Creates a new date field.
|
DateField(DateCell cell,
DateTimePropertyEditor propertyEditor)
Creates a new date field.
|
DateField(DateTimePropertyEditor propertyEditor)
Creates a new date field.
|
Modifier and Type | Method and Description |
---|---|
HandlerRegistration |
addCollapseHandler(CollapseEvent.CollapseHandler handler)
Adds a
CollapseEvent.CollapseHandler handler for CollapseEvent
events. |
HandlerRegistration |
addExpandHandler(ExpandEvent.ExpandHandler handler)
Adds a
ExpandEvent.ExpandHandler handler for ExpandEvent events. |
protected void |
expand() |
DateCell |
getCell()
Get the
Cell wrapped by this widget. |
DatePicker |
getDatePicker()
Returns the field's date picker.
|
Date |
getMaxValue()
Returns the field's max value.
|
Date |
getMinValue()
Returns the field's minimum value.
|
DateTimePropertyEditor |
getPropertyEditor()
Returns the field's property editor.
|
protected void |
onCellParseError(ParseErrorEvent event) |
void |
setAutoValidate(boolean autoValidate)
Sets whether the value is validated on each key press and when a date is selected via the picker (defaults to
false ). |
void |
setMaxValue(Date maxValue)
The maximum date allowed.
|
void |
setMinValue(Date minValue)
The minimum date allowed.
|
addTriggerClickHandler, isEditable, isFinishEditOnEnter, isMonitorTab, onBlur, onDetach, setEditable, setFinishEditOnEnter, setHideTrigger, setMonitorTab
addChangeHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addParseErrorHandler, clear, doAutoValidate, getCurrentValue, getCursorPos, getDirection, getDirectionEstimator, getEmptyText, getFocusEl, getImpl, getInputEl, getSelectedText, getSelectionLength, getText, getValueOrThrow, isAllowBlank, isClearValueOnParseError, isCurrentValid, isCurrentValid, isReadOnly, isSelectOnFocus, onRedraw, select, selectAll, setAllowBlank, setClearValueOnParseError, setCursorPos, setDirection, setDirectionEstimator, setDirectionEstimator, setEmptyText, setId, setPropertyEditor, setReadOnly, setSelectionRange, setSelectOnFocus, setTabIndex, setText, setValue, validateCurrent
addInvalidHandler, addValidator, addValidHandler, addValueChangeHandler, clearInvalid, finishEditing, flush, forceInvalid, getErrors, getErrorSupport, getName, getOriginalValue, getValidateOnBlur, getValidationDelay, getValidators, isAutoValidate, isEditing, isValid, isValid, markInvalid, markInvalid, onBrowserEvent, onDisable, onEnable, onFocus, onKeyDown, onKeyPress, onKeyUp, onLogicalBlur, onLogicalFocus, onNavigationKey, onPropertyChange, removeValidator, reset, setDelegate, setErrors, setErrorSupport, setName, setOriginalValue, setValidateOnBlur, setValidationDelay, setValue, showErrors, validate, validate, validateValue
createContext, getElement, getKey, getKeyProvider, getValue, onResize, redraw, redraw, setKeyProvider, setValue
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addGestureRecognizer, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleDependentName, addStyleOnOver, adjustPosition, adjustSize, applyState, assertAfterRender, assertPreRender, blur, clearSizeCache, disable, disableContextMenu, disableEvents, enable, enableEvents, fireCancellableEvent, fireEvent, focus, getData, getFocusSupport, getGestureRecognizer, getGestureRecognizerCount, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getPositionEl, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hide, hideShadow, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isMonitorWindowResize, isRendered, isStateful, isVisible, isVisible, mask, mask, notifyHide, notifyShow, onAfterFirstAttach, onAttach, onHide, onHideContextMenu, onLoad, onPosition, onRightClick, onShow, onShowContextMenu, onTouch, onUnload, onWindowResize, removeStyleDependentName, removeStyleOnOver, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setItemId, setMonitorWindowResize, setPagePosition, setPixelSize, setPosition, setShadow, setShadowPosition, setSize, setStateful, setStateId, setStyleDependentName, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addBlurHandler
public DateField()
public DateField(DateCell cell)
cell
- the date cellpublic DateField(DateCell cell, DateTimePropertyEditor propertyEditor)
cell
- the date cellpropertyEditor
- the property editorpublic DateField(DateTimePropertyEditor propertyEditor)
propertyEditor
- the property editorpublic void setAutoValidate(boolean autoValidate)
false
).setAutoValidate
in class Field<Date>
autoValidate
- true
to validate on each key presspublic DateCell getCell()
CellComponent
Cell
wrapped by this widget.getCell
in class TriggerField<Date>
Cell
being wrappedpublic DatePicker getDatePicker()
public Date getMaxValue()
public Date getMinValue()
public DateTimePropertyEditor getPropertyEditor()
ValueBaseField
getPropertyEditor
in class ValueBaseField<Date>
public void setMaxValue(Date maxValue)
maxValue
- the maximum value. Set maxValue to null to remove the maximum validation.public void setMinValue(Date minValue)
minValue
- the minimum value. Set minValue to null to remove the minimum validation.protected void expand()
protected void onCellParseError(ParseErrorEvent event)
onCellParseError
in class ValueBaseField<Date>
public HandlerRegistration addExpandHandler(ExpandEvent.ExpandHandler handler)
ExpandEvent.HasExpandHandlers
ExpandEvent.ExpandHandler
handler for ExpandEvent
events.addExpandHandler
in interface ExpandEvent.HasExpandHandlers
handler
- the handlerpublic HandlerRegistration addCollapseHandler(CollapseEvent.CollapseHandler handler)
CollapseEvent.HasCollapseHandlers
CollapseEvent.CollapseHandler
handler for CollapseEvent
events.addCollapseHandler
in interface CollapseEvent.HasCollapseHandlers
handler
- the handlerCopyright © 2018. All rights reserved.