Home > Class Reference > %SYS namespace > %ZEN.Component.dateText


class %ZEN.Component.dateText extends %ZEN.Component.control

Input control specialized for handling date values.
This displays a text box as well as a button that displays a popup calendar.
When the user enters a value into this control, it will be converted into the closest matching date value or and invalid date message.
Setting the value property of this control, will bypass date matching.
The value of this control is always in the canonical form: YYYY-MM-DD, you can, however, display a different format by setting the format property.

Property Inventory (Including Private)

Method Inventory (Including Private)


parameter DEFAULTCONTROLCLASS = dateTextInput;
Inherited description: The default css class used for the main element within this control. This is overridden by subclasses.
parameter DOMAIN = %ZEN;
Localization domain

Properties (Including Private)

property dayList as %ZEN.Datatype.csv (ZENLOCALIZE = 1);
List of localized day abbreviations shown at top of calendar. If specified, this is passed on the popup calendar.
Property methods: dayListDisplayToLogical(), dayListGet(), dayListIsValid(), dayListLogicalToDisplay(), dayListLogicalToOdbc(), dayListNormalize(), dayListSet()
property defaultTime as %ZEN.Datatype.string (ZENEXPRESSION = 1);
If specified and showTime is true, and the value supplied does not include a time portion, this will be used as the initial time displayed in the popup calendar.
Property methods: defaultTimeDisplayToLogical(), defaultTimeGet(), defaultTimeIsValid(), defaultTimeLogicalToDisplay(), defaultTimeLogicalToOdbc(), defaultTimeNormalize(), defaultTimeSet()
property firstDayOfWeek as %ZEN.Datatype.integer (MAXVAL = 6, MINVAL = 0) [ InitialExpression = 0 ];
Specified which day of the week (Sunday=0, Saturday = 6) is displayed as the starting day of the week.
This allows for customizing the calendar for locales where weeks start with other days of the week. This is passed on the popup calendar.
Property methods: firstDayOfWeekDisplayToLogical(), firstDayOfWeekGet(), firstDayOfWeekIsValid(), firstDayOfWeekLogicalToDisplay(), firstDayOfWeekLogicalToOdbc(), firstDayOfWeekNormalize(), firstDayOfWeekSet()
property format as %ZEN.Datatype.string (MAXLEN = 3, VALUELIST = ",MDY,DMY,YMD", ZENEXPRESSION = 1) [ InitialExpression = "YMD" ];
Optional. Specifies the display format used for this component. (Note that the internal value of this control is always YYYY-MM-DD). Possible values are:
  • "YMD" - Year,Month,Day
  • "MDY" - Month,Day,Year
  • "DMY" - Day,Month,Year
Property methods: formatDisplayToLogical(), formatGet(), formatIsValid(), formatLogicalToDisplay(), formatLogicalToOdbc(), formatNormalize(), formatSet(), formatValue()
property image as %ZEN.Datatype.uri [ InitialExpression = "portal/calendar_48.gif" ];
Optional. URL of the "show calendar" icon displayed within this control.
Property methods: imageDisplayToLogical(), imageGet(), imageIsValid(), imageLogicalToDisplay(), imageLogicalToOdbc(), imageNormalize(), imageSet()
property invalidDateMessage as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Invalid Date","%ZEN") ];
Localized "invalid date" message displayed by control.
Property methods: invalidDateMessageDisplayToLogical(), invalidDateMessageGet(), invalidDateMessageIsValid(), invalidDateMessageLogicalToDisplay(), invalidDateMessageLogicalToOdbc(), invalidDateMessageNormalize(), invalidDateMessageSet()
property maxDate as %ZEN.Datatype.string (ZENEXPRESSION = 1);
Optional. If specified, this is the latest date allowed by the calendar. This is a date in the form "YYYY-MM-DD".
Property methods: maxDateDisplayToLogical(), maxDateGet(), maxDateIsValid(), maxDateLogicalToDisplay(), maxDateLogicalToOdbc(), maxDateNormalize(), maxDateSet()
property minDate as %ZEN.Datatype.string (ZENEXPRESSION = 1);
Optional. If specified, this is the earliest date allowed by the calendar. This is a date in the form "YYYY-MM-DD".
Property methods: minDateDisplayToLogical(), minDateGet(), minDateIsValid(), minDateLogicalToDisplay(), minDateLogicalToOdbc(), minDateNormalize(), minDateSet()
property monthList as %ZEN.Datatype.csv (ZENLOCALIZE = 1);
List of localized month names shown at top of calendar. If specified, this is passed on the popup calendar.
Property methods: monthListDisplayToLogical(), monthListGet(), monthListIsValid(), monthListLogicalToDisplay(), monthListLogicalToOdbc(), monthListNormalize(), monthListSet()
property onshowPopup as %ZEN.Datatype.eventHandler;
onshowPopup event handler: This event is fired just before the popup calendar is displayed. It provides an opportunity to pass additional settings to the popup calendar.
The argument, settings, passed to this callback, is an object (associative array). Property values within this object are passed on as setting to the calendar control.
For example:
settings['gapWidth'] = '100px';
Property methods: onshowPopupDisplayToLogical(), onshowPopupGet(), onshowPopupIsValid(), onshowPopupLogicalToDisplay(), onshowPopupLogicalToOdbc(), onshowPopupNormalize(), onshowPopupSet()
property separator as %ZEN.Datatype.string (MAXLEN = 1, VALUELIST = ",-,/,., ", ZENEXPRESSION = 1) [ InitialExpression = "-" ];
Optional. Specifies the separator character used between date segments. Note, if time is also displayed, the time separator is always ":".
Property methods: separatorDisplayToLogical(), separatorGet(), separatorIsValid(), separatorLogicalToDisplay(), separatorLogicalToOdbc(), separatorNormalize(), separatorSet()
property showTime as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, then this calendar will also display and allow the user to edit the time of day portion of a date. In this case, the value used by this control will be in xDBC timestamp format: YYYY-MM-DD HH:MM:SS
Property methods: showTimeDisplayToLogical(), showTimeGet(), showTimeIsValid(), showTimeLogicalToDisplay(), showTimeLogicalToOdbc(), showTimeLogicalToXSD(), showTimeNormalize(), showTimeSet(), showTimeXSDToLogical()
property size as %ZEN.Datatype.integer (MINVAL = 0) [ InitialExpression = 15 ];
Size of the input area for this control.
Property methods: sizeDisplayToLogical(), sizeGet(), sizeIsValid(), sizeLogicalToDisplay(), sizeLogicalToOdbc(), sizeNormalize(), sizeSet()
property timeCaption as %ZEN.Datatype.caption;
Localized caption for time input box (see showTime). If specified, this is passed on the popup calendar.
Property methods: timeCaptionDisplayToLogical(), timeCaptionGet(), timeCaptionIsValid(), timeCaptionLogicalToDisplay(), timeCaptionLogicalToOdbc(), timeCaptionNormalize(), timeCaptionSet()

Methods (Including Private)

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 adjustSize() [ Language = javascript ]
Adjust size of control.
clientmethod applyDate(group) [ Language = javascript ]
Apply the value from the popup to the input control.
clientmethod formatValue(val) [ Language = javascript ]
Apply formatting to get displayed date value.
clientmethod isValid() [ Language = javascript ]
This method is called by the form validation mechanism to test if the current contents of this control are valid.
clientmethod keydownHandler(evt) [ Language = javascript ]
Key down handler; trap ESC to avoid IE issues.
clientmethod onDisplayHandler() [ Language = javascript ]
This client event, if present, is fired when the containing group is made visible.
clientmethod onRefreshContents() [ Language = javascript ]
This client callback is called just from refreshContents just after the new HTML is delivered from the server.
clientmethod ondatechangeHandler() [ Language = javascript ]
onchange handler for this component.
clientmethod onloadHandler() [ Language = javascript ]
Make sure that value is formatted correctly.
clientmethod setProperty(property, value, value2) [ Language = javascript ]
Set the value of a named property.
clientmethod showDateSelector(defaultTime) [ Language = javascript ]
Display date selector for this control.
clientmethod unformatValue(val) [ Language = javascript ]
Remove formatting to get logical date value.

Inherited Members

Inherited Properties (Including Private)

Inherited Methods (Including Private)