Initialize the Control

When runtime initializes the calendar control, it loads the control and then fires the event, Load Calendar Activity. What runtime loads into the control is based on any system functions defined in ER for this event. The date range that defines the initial load is determined by the view (day, week, or month) that has been set. Keep in mind that while up to three views can be visible, the user can interact with only one at a time-the current calendar view.

Calendar view can be set by the system function, Select Calendar View. Alternatively, if only one view is visible because the other two have been hidden either by the system function, Set View Visible, or by disabling them at design-time, then runtime sets the one remaining view. In all other scenarios, the order of precedence for the view to set is day, week, then month.

Runtime sets the start and stop system variables (SL_StartTime and SL_EndTime, respectively) based on the current view. Then runtime passes the variables to Load Calendar Activity, and the system in turn populates the current view of the control. Only the activities for the current view are loaded. The control populates activities for other dates and views as the user travels to them.