This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Home > Class Reference > ENSLIB namespace > %ZEN.Component.calendar

%ZEN.Component.calendar

class %ZEN.Component.calendar extends %ZEN.Component.control

A calendar control.
This is a custom control built out of HTML primitives.
The value associated with this control is in %Timestamp format: YYYY-MM-DD

Property Inventory

Method Inventory

Parameters

parameter DOMAIN = %ZEN;
Localization domain
parameter SYSMODULE;
Do not include in "form" module.

Properties

property dayList as %ZEN.Datatype.csv (ZENLOCALIZE = 1);
List of localized day abbreviations shown at top of calendar.
Property methods: dayListDisplayToLogical(), dayListGet(), dayListIsValid(), dayListLogicalToDisplay(), dayListLogicalToOdbc(), dayListNormalize(), dayListSet()
property defaultTime as %ZEN.Datatype.string;
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 endYear as %ZEN.Datatype.integer (MAXVAL = 9999);
Ending year displayed by year selector in calendar. If not defined, default is 30 years after now or the year portion of maxDate if defined.
Property methods: endYearDisplayToLogical(), endYearGet(), endYearIsValid(), endYearLogicalToDisplay(), endYearLogicalToOdbc(), endYearNormalize(), endYearSet()
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.
Property methods: firstDayOfWeekDisplayToLogical(), firstDayOfWeekGet(), firstDayOfWeekIsValid(), firstDayOfWeekLogicalToDisplay(), firstDayOfWeekLogicalToOdbc(), firstDayOfWeekNormalize(), firstDayOfWeekSet()
property fixedMonth as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, then this calendar will display a single month and provide no way for the user to change month and year.
Property methods: fixedMonthDisplayToLogical(), fixedMonthGet(), fixedMonthIsValid(), fixedMonthLogicalToDisplay(), fixedMonthLogicalToOdbc(), fixedMonthLogicalToXSD(), fixedMonthNormalize(), fixedMonthSet(), fixedMonthXSDToLogical()
property gapWidth as %ZEN.Datatype.length [ InitialExpression = "40px" ];
Size of the gap between the month and year indicators.
Setting this provides a way to adjust the overall size of the calendar.
Property methods: gapWidthDisplayToLogical(), gapWidthGet(), gapWidthIsValid(), gapWidthLogicalToDisplay(), gapWidthLogicalToOdbc(), gapWidthNormalize(), gapWidthSet()
property isRange as %ZEN.Datatype.boolean (XMLPROJECTION = "none") [ InitialExpression = 0 ];
Indicates that the current list of values contains a date range.
Property methods: isRangeDisplayToLogical(), isRangeGet(), isRangeIsValid(), isRangeLogicalToDisplay(), isRangeLogicalToOdbc(), isRangeLogicalToXSD(), isRangeNormalize(), isRangeSet(), isRangeXSDToLogical()
property listOfValues as list of %ZEN.Datatype.string (XMLPROJECTION = "none");
List of current selected values (when in multi-select mode). If a range is selected, then this list will contain the starting and ending values for the range.
Property methods: listOfValuesBuildValueArray(), listOfValuesCollectionToDisplay(), listOfValuesCollectionToOdbc(), listOfValuesDisplayToCollection(), listOfValuesDisplayToLogical(), listOfValuesGet(), listOfValuesGetObject(), listOfValuesGetObjectId(), listOfValuesGetSwizzled(), listOfValuesIsValid(), listOfValuesLogicalToDisplay(), listOfValuesLogicalToOdbc(), listOfValuesNormalize(), listOfValuesOdbcToCollection(), listOfValuesSet(), listOfValuesSetObject(), listOfValuesSetObjectId()
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".
Note that setting this does not effect what years are displayed by the calendar; that is controlled by the startYear and endYear properties.
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".
Note that setting this does not effect what years are displayed by the calendar; that is controlled by the startYear and endYear properties.
Property methods: minDateDisplayToLogical(), minDateGet(), minDateIsValid(), minDateLogicalToDisplay(), minDateLogicalToOdbc(), minDateNormalize(), minDateSet()
property month as %ZEN.Datatype.integer (MAXVAL = 12, MINVAL = 1);
Month (1 to 12) displayed by control.
Property methods: monthDisplayToLogical(), monthGet(), monthIsValid(), monthListDisplayToLogical(), monthListGet(), monthListIsValid(), monthListLogicalToDisplay(), monthListLogicalToOdbc(), monthListNormalize(), monthListSet(), monthLogicalToDisplay(), monthLogicalToOdbc(), monthNormalize(), monthSet()
property monthList as %ZEN.Datatype.csv (ZENLOCALIZE = 1);
List of localized month names shown at top of calendar.
Property methods: monthListDisplayToLogical(), monthListGet(), monthListIsValid(), monthListLogicalToDisplay(), monthListLogicalToOdbc(), monthListNormalize(), monthListSet()
property multiSelect as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, then allow the user to select multiple days by pressing the CTRL key when clicking on a date. The most recent selection is used as the value of the control. The list of multiple values is placed into the listOfValues array.
Property methods: multiSelectDisplayToLogical(), multiSelectGet(), multiSelectIsValid(), multiSelectLogicalToDisplay(), multiSelectLogicalToOdbc(), multiSelectLogicalToXSD(), multiSelectNormalize(), multiSelectSet(), multiSelectXSDToLogical()
property rangeSelect as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, then allow the user to select ranges of days by pressing the SHIFT key when clicking on a date. The most recent selection is used as the value of the control. The start and end values are placed into the listOfValues array and isRange will be set true.
Property methods: rangeSelectDisplayToLogical(), rangeSelectGet(), rangeSelectIsValid(), rangeSelectLogicalToDisplay(), rangeSelectLogicalToOdbc(), rangeSelectLogicalToXSD(), rangeSelectNormalize(), rangeSelectSet(), rangeSelectXSDToLogical()
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 startYear as %ZEN.Datatype.integer (MINVAL = 1600);
Starting year displayed by year selector in calendar. If not defined, default is 10 years previous to now or the year portion of minDate if defined.
Property methods: startYearDisplayToLogical(), startYearGet(), startYearIsValid(), startYearLogicalToDisplay(), startYearLogicalToOdbc(), startYearNormalize(), startYearSet()
property timeCaption as %ZEN.Datatype.caption;
Localized caption for time input box (see showTime).
Property methods: timeCaptionDisplayToLogical(), timeCaptionGet(), timeCaptionIsValid(), timeCaptionLogicalToDisplay(), timeCaptionLogicalToOdbc(), timeCaptionNormalize(), timeCaptionSet()
property year as %ZEN.Datatype.integer;
Year displayed by control.
Property methods: yearDisplayToLogical(), yearGet(), yearIsValid(), yearLogicalToDisplay(), yearLogicalToOdbc(), yearNormalize(), yearSet()

Methods

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 changeMonth() [ Language = javascript ]
Called when user changes month or year. Does not change current value of calandar.
clientmethod findEndYear() [ Language = javascript ]
Compute the ending year displayed by this calendar.
clientmethod findStartYear() [ Language = javascript ]
Compute the starting year displayed by this calendar.
clientmethod nextMonth() [ Language = javascript ]
Move forward one month; do not change current value;
clientmethod parseDate(value) [ Language = javascript ]
Take a date value in xDBC format (YYYY-MM-DD) and, if valid set the value of this control to the date.
clientmethod prevMonth() [ Language = javascript ]
Move back one month; do not change current value;
clientmethod renderCalendar() [ Language = javascript ]
Fill in contents of calendar
clientmethod renderCalendarAll() [ Language = javascript ]
Fill in contents of entire calendar (month and year drop downs).
clientmethod renderContents() [ Language = javascript ]
Client-side method to render control.
clientmethod selectDay(day, evt) [ Language = javascript ]
Called when user clicks on a day.
clientmethod setProperty(property, value, value2) [ Language = javascript ]
Set the value of a named property.
clientmethod timeChangeHandler(evt) [ Language = javascript ]
Handler for change event in time control.
clientmethod timeKeyHandler(evt) [ Language = javascript ]
Handler for keypress event in time control.

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new window