Home > Class Reference > ENSLIB namespace > %ZEN.Component.dateSelect
Private  Storage   


class %ZEN.Component.dateSelect extends control

A specialized input control for handling date values.
This control allows the user to view and edit a date value via a set of comboboxes, one for year, month, and day of month. This is useful for cases like birth dates or expiration dates where a popup calendar (as in the dateText component) is cumbersome.
The logical value of this control takes the standard form YYYY-MM-DD. You can change the order of the year, month, and day dropdows using the format property.
Note that the standard HTML events (onfocus, onclick, etc.) are fired for each of the select controls that make up this component.
Setting readOnly to true has the same effect as disabling this component; this is the standard HTML behavior for select controls.


Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 6 8


%condition %import %includeFiles %page
%resource align aux clientType
composite containerStyle controlClass controlStyle
dataBinding disabled dragEnabled dropEnabled
enclosingClass enclosingStyle error format
height hidden hint hintClass
hintStyle id index invalid
invalidMessage label labelClass labelDisabledClass
labelStyle maxYear minYear monthList
name onafterdrag onbeforedrag onblur
onchange onclick ondblclick ondrag
ondrop onfocus onhide onkeydown
onkeypress onkeyup onmousedown onmouseout
onmouseover onmouseup onrefresh onshow
onsubmit ontouchend ontouchmove ontouchstart
onupdate onvalidate originalValue parent
readOnly required requiredMessage shortMonth
showLabel showMonthNumber slice tabIndex
title tuple valign value
visible width window

%AddToSaveSet %Attr %BindExport %ClassIsLatestVersion
%ClassName %ConstructClone %DispatchClassMethod %DispatchGetModified
%DispatchGetProperty %DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty
%DispatchSetProperty %DrawComponentHTML %DrawHTML %DrawJSStrings
%EnclosingDivId %Eval %EvalC %Extends
%ForceClientRender %GetEventHandlers %GetForm %GetParameter
%GetXMLName %IsA %IsModified %MakeId
%Name %New %NormalizeObject %ObjectModified
%OnAddToPageAfter %OnAddToPageBefore %OnDrawEnclosingDiv %OnDrawObjectProperties
%OnObjectSynch %OnZENDeserialize %OriginalNamespace %PackageName
%QuoteValue %QuoteValueL10N %RemoveFromSaveSet %Self
%SerializeObject %SetDefaultValues %SetModified %ValidateObject
XMLDTD XMLExport XMLExportToStream XMLExportToString
XMLNew XMLSchema XMLSchemaNamespace XMLSchemaType
dragFinishHandler dragHandler dragNotifyHandler dragStartHandler
dropHandler dropStartHandler exposeComponent findElement
fireOnUpdateEvent focus formatValue getDay
getDisabled getDragData getEnclosingDiv getForm
getHidden getHintElement getInvalidReason getLabelElement
getMonth getProperty getReadOnly getSettings
getType getValue getYear invokeSuper
isCompleteDate isModified isOfType isValid
makeId normalizeValue onCreate onDelete
onDisplayHandler onEndModalHandler onPopupAction onRefreshContents
onSerialize onStartModalHandler onchangeHandler onloadHandler
onunloadHandler onupdateHandler refreshContents render
renderContents renderSVG select setDisabled
setHidden setOverlayMode setProperty setReadOnly
setValue startProgressBar stopProgressBar sysName
unformatValue validationHandler


• parameter DEFAULTCONTROLCLASS = "dateSelect";
The default css class used for the main element within this control. This is overridden by subclasses.
• parameter DOMAIN = "%ZEN";
Localization domain


• property format as %ZEN.Datatype.string(MAXLEN=3,VALUELIST=",MDY,DMY,YMD,DM,MD,YM,MY,Y,M",ZENEXPRESSION=1) [ InitialExpression = "MDY" ];
This is a string that specifies the order in which the date components are to be displayed.
Possible values are:
  • "MDY" - Month,Day,Year
  • "DMY" - Day,Month,Year
  • "YMD" - Year,Month,Day
  • "YDM" - Year,Day,Month
  • "DM" - Day,Month
  • "MD" - Month,Day
  • "YM" - Year,Month
  • "MY" - Month,Year
  • "Y" - Year
  • "M" - Month
• property maxYear as %ZEN.Datatype.integer(ZENEXPRESSION=1);
Optional. If specified, this is the latest year allowed by the calendar. If not specified, the current year plus 20 is used.
• property minYear as %ZEN.Datatype.integer(ZENEXPRESSION=1);
Optional. If specified, this is the earliest year allowed by the calendar. If not specified, 1900 is used.
• property monthList as %ZEN.Datatype.csv(ZENLOCALIZE=1);
List of localized month names shown in the month combo box.
• property shortMonth as %ZEN.Datatype.boolean(ZENLOCALIZE=1) [ InitialExpression = 0 ];
If true (default is false) show the first 3 characters of month names in the month dropdown. Note, you can also control this by setting the value of the monthList property.
• property showMonthNumber as %ZEN.Datatype.boolean(ZENLOCALIZE=1) [ InitialExpression = 0 ];
If true (default id false) show the ordinal month number along with month names in the month dropdown.


• method %DrawHTML()
Static HTML display method: draw the BODY of this component as HTML.
Subclasses implement this in order to render the static HTML contents of a component.
• method focus() [ Language = javascript ]
Client-side method to give input focus to this control.
• method getDay() [ Language = javascript ]
Return displayed day value.
• method getMonth() [ Language = javascript ]
Return displayed month value.
• method getYear() [ Language = javascript ]
Return displayed year value.
• method isCompleteDate() [ Language = javascript ]
Test if this is an complete date; either all values are provided or no values are provided.
• method isValid() [ Language = javascript ]
This method is called by the form validation mechanism to test if the current contents of this control are valid.
Returns true if the control value is valid; false otherwise. Subclasses can override this to provide specific behavior.
The default behavior is to return true.
• method setProperty(property, value, value2) [ Language = javascript ]
Set the value of a named property.