public class Calendar extends XulElement implements Constrainted
Default getZclass(): z-calendar. (since 3.5.0)
For example
<calendar weekOfYear="true" onWeekClick='alert(event.data)'/>
[ZK EE]
[Since 6.5.0]| Constructor and Description |
|---|
Calendar() |
Calendar(Date value) |
Calendar(LocalDate value) |
Calendar(LocalDateTime value) |
Calendar(ZonedDateTime value) |
| Modifier and Type | Method and Description |
|---|---|
Constraint |
getConstraint()
Returns the constraint, or null if no constraint at all.
|
String |
getName()
Returns the name of this component.
|
boolean |
getShowTodayLink()
Returns whether enable to show the link that jump to today in day view
|
TimeZone |
getTimeZone()
Deprecated.
As of release 5.0.5, it is meaningless to set time zone for a calendar.
|
String |
getTodayLinkLabel()
Returns the label of the link that jump to today in day view
|
Date |
getValue()
Returns the value that is assigned to this component, never null.
|
LocalDate |
getValueInLocalDate()
Returns the value (in LocalDate) that is assigned to this component, never null.
|
LocalDateTime |
getValueInLocalDateTime()
Returns the value (in LocalDateTime) that is assigned to this component, never null.
|
LocalTime |
getValueInLocalTime()
Returns the value (in LocalTime) that is assigned to this component, never null.
|
ZonedDateTime |
getValueInZonedDateTime()
Returns the value (in ZonedDateTime) that is assigned to this component, never null.
|
String |
getZclass() |
boolean |
isWeekOfYear()
Returns whether enable to show the week number within the current year or not.
|
protected void |
renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) |
void |
service(org.zkoss.zk.au.AuRequest request,
boolean everError)
Processes an AU request.
|
void |
setConstraint(Constraint constr)
Sets the constraint.
|
void |
setConstraint(String constr)
Sets a list of constraints separated by comma.
|
void |
setName(String name)
Sets the name of this component.
|
void |
setShowTodayLink(boolean showTodayLink)
Sets whether enable to show the link that jump to today in day view
|
void |
setTimeZone(TimeZone tzone)
As of release 5.0.5, it is meaningless to set time zone for a calendar.
|
void |
setTodayLinkLabel(String todayLinkLabel)
Sets the label of the link that jump to today in day view
|
void |
setValue(Date value)
Assigns a value to this component.
|
void |
setValueInLocalDate(LocalDate value)
Assigns a value (in LocalDate) to this component.
|
void |
setValueInLocalDateTime(LocalDateTime value)
Assigns a value (in LocalDateTime) to this component.
|
void |
setValueInLocalTime(LocalTime value)
It is meaningless to set only LocalTime in calendar.
|
void |
setValueInZonedDateTime(ZonedDateTime value)
Assigns a value (in ZonedDateTime) to this component.
|
void |
setWeekOfYear(boolean weekOfYear)
Sets whether enable to show the week number within the current year or
not.
|
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributesaddSclass, evalCSSFlex, focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectlyaddAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, invalidatePartial, isChildable, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerializepublic Calendar()
public Calendar(Date value)
public Calendar(ZonedDateTime value)
public Calendar(LocalDateTime value)
public Calendar(LocalDate value)
public void setWeekOfYear(boolean weekOfYear)
public boolean isWeekOfYear()
Default: false
public TimeZone getTimeZone()
public void setTimeZone(TimeZone tzone)
public Date getValue()
public void setValue(Date value)
value - the date to assign. If null, today is assumed.public ZonedDateTime getValueInZonedDateTime()
public void setValueInZonedDateTime(ZonedDateTime value)
value - the date to assign. If null, today is assumed.public LocalDateTime getValueInLocalDateTime()
public void setValueInLocalDateTime(LocalDateTime value)
value - the date to assign. If null, today is assumed.public LocalDate getValueInLocalDate()
public void setValueInLocalDate(LocalDate value)
value - the date to assign. If null, today is assumed.public LocalTime getValueInLocalTime()
public void setValueInLocalTime(LocalTime value) throws org.zkoss.zk.ui.WrongValueException
org.zkoss.zk.ui.WrongValueExceptionpublic String getName()
Default: null.
The name is used only to work with "legacy" Web application that handles user's request by servlets. It works only with HTTP/HTML-based browsers. It doesn't work with other kind of clients.
Don't use this method if your application is purely based on ZK's event-driven model.
public void setName(String name)
The name is used only to work with "legacy" Web application that handles user's request by servlets. It works only with HTTP/HTML-based browsers. It doesn't work with other kind of clients.
Don't use this method if your application is purely based on ZK's event-driven model.
name - the name of this component.public boolean getShowTodayLink()
Default: false
public void setShowTodayLink(boolean showTodayLink)
showTodayLink - show or hiddenpublic String getTodayLinkLabel()
Default: Today
public void setTodayLinkLabel(String todayLinkLabel)
todayLinkLabel - today link labelpublic void setConstraint(String constr)
constr - a list of constraints separated by comma.public void setConstraint(Constraint constr)
ConstraintedDefault: null (means no constraint all all).
setConstraint in interface Constraintedpublic Constraint getConstraint()
ConstraintedgetConstraint in interface Constraintedpublic String getZclass()
getZclass in class org.zkoss.zk.ui.HtmlBasedComponentpublic void service(org.zkoss.zk.au.AuRequest request,
boolean everError)
Default: in addition to what are handled by HtmlBasedComponent.service(org.zkoss.zk.au.AuRequest, boolean),
it also handles onChange, onChanging and onError.
service in interface org.zkoss.zk.ui.sys.ComponentCtrlservice in class org.zkoss.zk.ui.HtmlBasedComponentprotected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
throws IOException
renderProperties in class XulElementIOExceptionCopyright © 2023. All rights reserved.