public class Datebox extends FormatWidget
Default Widget.getZclass()
: z-datebox.
onChangingDelay, onChangingForced
$weave, auDelay, autag, bindLevel, className, desktop, effects_, firstChild, id, insertingBefore_, inServer, lastChild, nChildren, nextSibling, parent, previousSibling, uuid, widgetName
Modifier and Type | Method and Description |
---|---|
protected void |
enterPressed_(Event evt)
Called when the user presses enter when this widget has the focus (
Widget.focus(int) ). |
protected void |
escPressed_(Event evt)
Called when the user presses escape key when this widget has the focus (
Widget.focus(int) ). |
String |
getConstraint()
Returns the constraint, or null if no constraint at all.
|
String |
getDateFormat()
Returns the Date format of the specified format
|
Date |
getDefaultDateTime()
Returns the default datetime if the value is empty.
|
Array |
getDisplayedTimeZones()
Returns a list of the time zones that will be displayed at the
client and allow user to select.
|
String |
getFormat()
Returns the full date format of the specified format
|
String |
getIconSclass()
Returns the iconSclass name of this Datebox.
|
String |
getSelectLevel()
Returns the level that a user can select.
|
String |
getTimeFormat()
Returns the Time format of the specified format
|
String |
getTimeZone()
Returns the time zone that this date box belongs to.
|
String |
getTimeZoneLabel()
Returns the label of the time zone
|
String |
getTodayLinkLabel()
Returns the label of the link that jump to today in day view
|
String |
getUnformater()
Returns the unformater.
|
boolean |
isButtonVisible()
Returns whether the button (on the right of the textbox) is visible.
|
boolean |
isClosePopupOnTimezoneChange()
Returns whether to auto close the datebox popup after changing the timezone.
|
boolean |
isLenient()
Returns whether or not date/time parsing is to be lenient.
|
boolean |
isShowTodayLink()
Returns whether enable to show the link that jump to today in day view
Default: false
|
boolean |
isStrictDate()
Returns whether or not date/time should be strict.
|
boolean |
isTimeZonesReadonly()
Returns whether the list of the time zones to display is readonly.
|
boolean |
isWeekOfYear()
Returns whether enable to show the week number in the current calendar
or not.
|
void |
setButtonVisible(boolean visible)
Sets whether the button (on the right of the textbox) is visible.
|
void |
setClosePopupOnTimezoneChange(boolean closePopupOnTimezoneChange)
Sets whether to auto close the datebox popup after changing the timezone.
|
void |
setConstraint(String cst)
Sets the constraint.
|
void |
setDefaultDateTime(Date defaultDateTime)
Sets the default datetime if the value is empty.
|
void |
setDisplayedTimeZones(String dtzones)
Sets a catenation of a list of the time zones' ID, separated by comma,
that will be displayed at the client and allow user to select.
|
void |
setFormat(String format)
Sets the date format.
|
void |
setLenient(boolean lenient)
Sets whether or not date/time parsing is to be lenient.
|
void |
setOpen()
Drops down or closes the calendar to select a date.
|
void |
setSelectLevel(String selectLevel)
Sets the level that a user can select.
|
void |
setShowTodayLink(boolean showTodayLink)
Sets whether enable to show the link that jump to today in day view
|
void |
setStrictDate(boolean strictDate)
Sets whether or not date/time should be strict.
|
void |
setTimeZone(String timezone)
Sets the time zone that this date box belongs to.
|
void |
setTimeZonesReadonly(boolean readonly)
Sets whether the list of the time zones to display is readonly.
|
void |
setTodayLinkLabel(String todayLinkLabel)
Sets the label of the link that jump to today in day view
|
void |
setUnformater(String unf)
Sets the unformater function.
|
void |
setWeekOfYear(boolean weekOfYear)
Sets whether enable to show the week number in the current calendar or
not.
|
clearErrorMessage, coerceFromString_, coerceToString_, fireOnChange, getCols, getErrorboxIconSclass, getErrorboxSclass, getErrorMessage, getErrorMesssage, getInplaceCSS, getInputAttributes, getInputNode, getMaxlength, getName, getPlaceholder, getTabindex, getText, getType, getValue, inRoundedMold, isDisabled, isInplace, isInstant, isMultiline, isReadonly, select, setCols, setDisabled, setErrorboxIconSclass, setErrorboxSclass, setErrorMessage, setInplace, setInputAttributes, setInsertedText, setInstant, setMaxlength, setName, setPlaceholder, setReadonly, setTabindex, setText, setValue, shallUpdate_, showError_, textAttrs_, updateChange_, validate_
afterKeyDown_, beforeCtrlKeys_, getContext, getCtrlKeys, getOpenTooltip, getPopup, getTooltip, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip
$, $f, $f, $f, $init, $n, $n, $o, $s, $service, afterAnima_, afterParentChanged_, appendChild, appendChild, beforeParentChanged_, beforeSendAU_, bind_, bind, bindChildren_, bindDoubleTap_, bindMissingAncestors, bindSwipe_, bindTapHold_, canActivate, cleanDrag_, clear, clearCache, cloneDrag_, deferRedraw_, deferRedrawHTML_, detach, doBlur_, doClick_, doDoubleClick_, doFocus_, doKeyDown_, doKeyPress_, doKeyUp_, domAttrs_, domClass_, domListen_, doMouseDown_, doMouseMove_, doMouseOut_, doMouseOver_, doMouseUp_, domStyle_, domTextStyleAttr_, domTooltiptext_, domUnlisten_, doPaste_, doResizeScroll_, doRightClick_, doSelect_, doSwipe_, doTooltipOut_, doTooltipOver_, dropEffect_, extraBind_, fire, fireX, focus_, focus, forcerender, fromPageCoord, get, getAction, getCaveNode, getChildAt, getChildIndex, getClass, getCssflex, getDraggable, getDragMessage_, getDragNode, getDragOptions_, getDrop_, getDroppable, getElementsById, getElementsByName, getFirstNode_, getFloatZIndex_, getHeight, getHflex, getId, getLeft, getMold, getOldWidget_, getPage, getRenderdefer, getSclass, getScrollLeft, getScrollTop, getStyle, getTextNode, getTooltiptext, getTop, getTopWidget, getVflex, getWidth, getZclass, getZIndex, hide, ignoreDescendantFloatUp_, ignoreDrag_, initDrag_, insertBefore, insertChildHTML_, isAutoId, isBinding, isFloating_, isListen, isRealElement, isRealVisible, isRealVisible, isVisible, isVisible, isWatchable_, listen, listenOnFitSize_, mimicMouseDown_, newInstance, nextUuid, onAfterSize, onChildAdded_, onChildRemoved_, onChildRenderDefer_, onChildReplaced_, onChildVisible_, onDrop_, redraw, redrawHTML_, register, removeChild, removeChild, removeChildHTML_, removeHTML_, replaceCavedChildren_, replaceChildHTML_, replaceHTML, replaceWidget, rerender, rerender, rerenderLater_, rerenderNow_, scrollIntoView, sendAU_, set, set, setAction, setChildren, setCssflex, setDomVisible_, setDraggable, setDroppable, setFloating_, setFloatZIndex_, setHeight, setHflex, setId, setLeft, setListener, setListener, setListeners, setMold, setRenderdefer, setSclass, setScrollLeft, setScrollTop, setStyle, setTooltiptext, setTop, setTopmost, setVflex, setVisible, setWidth, setZclass, setZIndex, shallChildROD_, shallFireSizedLaterWhenAddChd_, shallIgnoreClick_, show, smartUpdate, unbind_, unbind, unbindChildren_, unbindDoubleTap_, unbindSwipe_, unbindTapHold_, uncloneDrag_, unlisten, unlistenOnFitSize_, updateDomClass_, updateDomStyle_, uuid, zsync
$init, $instanceof, $super, $super, $supers, $supers, afterInit, isAssignableFrom, isInstance, proxy
public boolean isButtonVisible()
Default: true.
public void setButtonVisible(boolean visible)
visible
- public String getFormat()
getFormat
in class FormatWidget
public void setFormat(String format)
The following pattern letters are defined:
Letter | Date or Time Component | Presentation | Examples |
---|---|---|---|
G
| Era designator | Text | AD
|
y
| Year | Year | 1996 ; 96
|
M
| Month in year | Month | July ; Jul ; 07
|
w
| Week in year (starting at 1) | Number | 27
|
W
| Week in month (starting at 1) | Number | 2
|
D
| Day in year (starting at 1) | Number | 189
|
d
| Day in month (starting at 1) | Number | 10
|
F
| Day of week in month | Number | 2
|
E
| Day in week | Text | Tuesday ; Tue
|
setFormat
in class FormatWidget
format
- the pattern.public String getConstraint()
public void setConstraint(String cst)
Default: null (means no constraint all all).
setConstraint
in class InputWidget
cst
- public String getTimeZone()
public void setTimeZone(String timezone)
timezone
- the time zone's ID, such as "America/Los_Angeles".public boolean isTimeZonesReadonly()
public void setTimeZonesReadonly(boolean readonly)
readonly
- public Array getDisplayedTimeZones()
Default: null
public void setDisplayedTimeZones(String dtzones)
dtzones
- a catenation of a list of the timezones' ID, such as
"America/Los_Angeles,GMT+8"
public String getUnformater()
public void setUnformater(String unf)
unf
- the unformater functionpublic boolean isLenient()
With lenient parsing, the parser may use heuristics to interpret inputs that do not precisely match this object's format. With strict parsing, inputs must match this object's format.
public void setLenient(boolean lenient)
With lenient parsing, the parser may use heuristics to interpret inputs that do not precisely match this object's format. With strict parsing, inputs must match this object's format.
Default: true.
lenient
- public boolean isWeekOfYear()
Default: false
public void setWeekOfYear(boolean weekOfYear)
weekOfYear
- public boolean isShowTodayLink()
Default: false
public void setShowTodayLink(boolean showTodayLink)
showTodayLink
- public String getTodayLinkLabel()
public void setTodayLinkLabel(String todayLinkLabel)
todayLinkLabel
- public boolean isStrictDate()
Default: false.
public void setStrictDate(boolean strictDate)
strictDate
- public Date getDefaultDateTime()
Default: null (means current datetime).
public void setDefaultDateTime(Date defaultDateTime)
defaultDateTime
- Default datetime. null means current datetime.public String getSelectLevel()
Default: "day"
public void setSelectLevel(String selectLevel)
selectLevel
- the level that a user can selectpublic boolean isClosePopupOnTimezoneChange()
Default: true
public void setClosePopupOnTimezoneChange(boolean closePopupOnTimezoneChange)
closePopupOnTimezoneChange
- shall close the datebox popup or notpublic String getIconSclass()
public String getTimeFormat()
public String getDateFormat()
public void setOpen()
protected void enterPressed_(Event evt)
Widget.focus(int)
).
call the close function
evt
- the widget event.
The original DOM event and target can be retrieved by Event.domEvent
and Event.domTarget
protected void escPressed_(Event evt)
Widget.focus(int)
).
call the close function
evt
- the widget event.
The original DOM event and target can be retrieved by Event.domEvent
and Event.domTarget
public String getTimeZoneLabel()
Copyright © 2005-2023 Potix Corporation. All Rights Reserved.