Class Calendar
- All Implemented Interfaces:
Serializable,Cloneable,org.zkoss.zk.ui.Component,org.zkoss.zk.ui.ext.Scope,org.zkoss.zk.ui.sys.ComponentCtrl,Constrainted
Default getZclass(): z-calendar. (since 3.5.0)
Support display the week number within the current year
Events: onWeekClickFor example
<calendar weekOfYear="true" onWeekClick='alert(event.data)'/>
[ZK EE]
[Since 6.5.0]- Author:
- tomyeh
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrlNested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.AbstractComponent.Children, org.zkoss.zk.ui.AbstractComponent.ForwardInfo, org.zkoss.zk.ui.AbstractComponent.TargetInfo -
Field Summary
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_zclassFields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPEFields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_CLONED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, AFTER_PARENT_CHANGED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the constraint, or null if no constraint at all.getName()Returns the name of this component.booleanReturns whether enable to show the link that jump to today in day viewReturns the label of the link that jump to today in day viewgetValue()Returns the value that is assigned to this component, never null.Returns the value (in LocalDate) that is assigned to this component, never null.Returns the value (in LocalDateTime) that is assigned to this component, never null.Returns the value (in LocalTime) that is assigned to this component, never null.Returns the value (in ZonedDateTime) that is assigned to this component, never null.booleanReturns whether enable to show the week number within the current year or not.protected voidrenderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) voidservice(org.zkoss.zk.au.AuRequest request, boolean everError) Processes an AU request.voidsetConstraint(String constr) Sets a list of constraints separated by comma.voidsetConstraint(Constraint constr) Sets the constraint.voidSets the name of this component.voidsetShowTodayLink(boolean showTodayLink) Sets whether enable to show the link that jump to today in day viewvoidsetTodayLinkLabel(String todayLinkLabel) Sets the label of the link that jump to today in day viewvoidAssigns a value to this component.voidsetValueInLocalDate(LocalDate value) Assigns a value (in LocalDate) to this component.voidAssigns a value (in LocalDateTime) to this component.voidsetValueInLocalTime(LocalTime value) It is meaningless to set only LocalTime in calendar.voidAssigns a value (in ZonedDateTime) to this component.voidsetWeekOfYear(boolean weekOfYear) Sets whether enable to show the week number within the current year or not.Methods inherited from class org.zkoss.zul.impl.XulElement
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributesMethods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, evalCSSFlex, focus, getAction, getClientAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getSkeleton, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setClientAction, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setSkeleton, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectlyMethods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, destroyIndexCacheMap, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, disableHostChanged, enableBindingAnnotation, enableHostChanged, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, 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, getForwards, getId, getIndexCacheMap, getLastChild, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, initIndexCacheMap, insertBefore, invalidate, isChildable, isDisabledHostChanged, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onParentChanged, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, renderPropertiesOnly, 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, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
Constructor Details
-
Calendar
public Calendar() -
Calendar
-
Calendar
-
Calendar
-
Calendar
-
-
Method Details
-
setWeekOfYear
public void setWeekOfYear(boolean weekOfYear) Sets whether enable to show the week number within the current year or not. [ZK EE]- Since:
- 6.5.0
-
isWeekOfYear
public boolean isWeekOfYear()Returns whether enable to show the week number within the current year or not.Default: false
- Since:
- 6.5.0
-
getValue
Returns the value that is assigned to this component, never null. -
setValue
Assigns a value to this component.- Parameters:
value- the date to assign. If null, today is assumed.
-
getValueInZonedDateTime
Returns the value (in ZonedDateTime) that is assigned to this component, never null.- Since:
- 9.0.0
-
setValueInZonedDateTime
Assigns a value (in ZonedDateTime) to this component.- Parameters:
value- the date to assign. If null, today is assumed.- Since:
- 9.0.0
-
getValueInLocalDateTime
Returns the value (in LocalDateTime) that is assigned to this component, never null.- Since:
- 9.0.0
-
setValueInLocalDateTime
Assigns a value (in LocalDateTime) to this component.- Parameters:
value- the date to assign. If null, today is assumed.- Since:
- 9.0.0
-
getValueInLocalDate
Returns the value (in LocalDate) that is assigned to this component, never null.- Since:
- 9.0.0
-
setValueInLocalDate
Assigns a value (in LocalDate) to this component.- Parameters:
value- the date to assign. If null, today is assumed.- Since:
- 9.0.0
-
getValueInLocalTime
Returns the value (in LocalTime) that is assigned to this component, never null.- Since:
- 9.0.0
-
setValueInLocalTime
It is meaningless to set only LocalTime in calendar.- Throws:
org.zkoss.zk.ui.WrongValueException- Since:
- 9.0.0
-
getName
Returns the name of this component.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.
- Since:
- 3.0.0
-
setName
Sets the name of this component.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.
- Parameters:
name- the name of this component.- Since:
- 3.0.0
-
getShowTodayLink
public boolean getShowTodayLink()Returns whether enable to show the link that jump to today in day viewDefault: false
- Returns:
- boolean
- Since:
- 8.0.0
-
setShowTodayLink
public void setShowTodayLink(boolean showTodayLink) Sets whether enable to show the link that jump to today in day view- Parameters:
showTodayLink- show or hidden- Since:
- 8.0.0
-
getTodayLinkLabel
Returns the label of the link that jump to today in day viewDefault: Today
- Returns:
- String
- Since:
- 8.0.4
-
setTodayLinkLabel
Sets the label of the link that jump to today in day view- Parameters:
todayLinkLabel- today link label- Since:
- 8.0.4
-
setConstraint
Sets a list of constraints separated by comma. Example: "between 20071012 and 20071223", "before 20080103".- Parameters:
constr- a list of constraints separated by comma.
-
setConstraint
Description copied from interface:ConstraintedSets the constraint.Default: null (means no constraint all all).
- Specified by:
setConstraintin interfaceConstrainted
-
getConstraint
Description copied from interface:ConstraintedReturns the constraint, or null if no constraint at all.- Specified by:
getConstraintin interfaceConstrainted
-
getZclass
- Overrides:
getZclassin classorg.zkoss.zk.ui.HtmlBasedComponent
-
service
public void service(org.zkoss.zk.au.AuRequest request, boolean everError) Processes an AU request.Default: in addition to what are handled by
HtmlBasedComponent.service(org.zkoss.zk.au.AuRequest, boolean), it also handles onChange, onChanging and onError.- Specified by:
servicein interfaceorg.zkoss.zk.ui.sys.ComponentCtrl- Overrides:
servicein classorg.zkoss.zk.ui.HtmlBasedComponent- Since:
- 5.0.0
-
renderProperties
- Overrides:
renderPropertiesin classXulElement- Throws:
IOException
-