Skip to main content


deprecated class %ZEN.Component.dateSelect extends %ZEN.Component.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.

Property Inventory

Method Inventory


parameter DEFAULTCONTROLCLASS = dateSelect;
Inherited description: 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 methods: formatDisplayToLogical(), formatGet(), formatIsValid(), formatLogicalToDisplay(), formatLogicalToOdbc(), formatNormalize(), formatSet()
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 methods: maxYearDisplayToLogical(), maxYearGet(), maxYearIsValid(), maxYearLogicalToDisplay(), maxYearLogicalToOdbc(), maxYearNormalize(), maxYearSet()
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 methods: minYearDisplayToLogical(), minYearGet(), minYearIsValid(), minYearLogicalToDisplay(), minYearLogicalToOdbc(), minYearNormalize(), minYearSet()
property monthList as %ZEN.Datatype.csv (ZENLOCALIZE = 1);
List of localized month names shown in the month combo box.
Property methods: monthListDisplayToLogical(), monthListGet(), monthListIsValid(), monthListLogicalToDisplay(), monthListLogicalToOdbc(), monthListNormalize(), monthListSet()
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 methods: shortMonthDisplayToLogical(), shortMonthGet(), shortMonthIsValid(), shortMonthLogicalToDisplay(), shortMonthLogicalToOdbc(), shortMonthLogicalToXSD(), shortMonthNormalize(), shortMonthSet(), shortMonthXSDToLogical()
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.
Property methods: showMonthNumberDisplayToLogical(), showMonthNumberGet(), showMonthNumberIsValid(), showMonthNumberLogicalToDisplay(), showMonthNumberLogicalToOdbc(), showMonthNumberLogicalToXSD(), showMonthNumberNormalize(), showMonthNumberSet(), showMonthNumberXSDToLogical()


method %DrawHTML()
Inherited description: 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.
clientmethod focus() [ Language = javascript ]
Client-side method to give input focus to this control.
clientmethod getDay() [ Language = javascript ]
Return displayed day value.
clientmethod getMonth() [ Language = javascript ]
Return displayed month value.
clientmethod getYear() [ Language = javascript ]
Return displayed year value.
clientmethod isCompleteDate() [ Language = javascript ]
Test if this is an complete date; either all values are provided or no values are provided.
clientmethod isValid() [ Language = javascript ]
Inherited description: 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.
clientmethod setProperty(property, value, value2) [ Language = javascript ]
Set the value of a named property.

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab