class %ZEN.Component.calendar
extends 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
parameter DOMAIN = "%ZEN";
Localization domain
parameter SYSMODULE;
Do not include in "form" module.
property dayList
as %ZEN.Datatype.csv(ZENLOCALIZE=1);
List of localized day abbreviations shown at top of calendar.
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 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 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 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 isRange
as %ZEN.Datatype.boolean(XMLPROJECTION="none") [ InitialExpression = 0 ];
Indicates that the current list of values contains a date range.
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 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 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 month
as %ZEN.Datatype.integer(MAXVAL=12,MINVAL=1);
Month (1 to 12) displayed by control.
property monthList
as %ZEN.Datatype.csv(ZENLOCALIZE=1);
List of localized month names shown at top of calendar.
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 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 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 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 timeCaption
as %ZEN.Datatype.caption;
Localized caption for time input box (see showTime).
property year
as %ZEN.Datatype.integer;
Year displayed by control.
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 changeMonth()
[ Language = javascript ]
Called when user changes month or year.
Does not change current value of calandar.
method findEndYear()
[ Language = javascript ]
Compute the ending year displayed by this calendar.
method findStartYear()
[ Language = javascript ]
Compute the starting year displayed by this calendar.
method nextMonth()
[ Language = javascript ]
Move forward one month; do not change current value;
method 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.
method prevMonth()
[ Language = javascript ]
Move back one month; do not change current value;
method renderCalendar()
[ Language = javascript ]
Fill in contents of calendar
method renderCalendarAll()
[ Language = javascript ]
Fill in contents of entire calendar (month and year drop downs).
method renderContents()
[ Language = javascript ]
Client-side method to render control.
method selectDay(day, evt)
[ Language = javascript ]
Called when user clicks on a day.
method setProperty(property, value, value2)
[ Language = javascript ]
Set the value of a named property.
method timeChangeHandler(evt)
[ Language = javascript ]
Handler for change event in time control.
method timeKeyHandler(evt)
[ Language = javascript ]
Handler for keypress event in time control.