Calendar Control System Functions

This section discusses the system functions unique to the calendar control.

In general, you can use system functions to perform these types of tasks:

  • Add, modify, or delete an activity from the calendar control.

  • Classify time ranges as being working, nonworking, or of another special type.

  • Modify aspects of the calendar control interface.

When you add an activity through the system function, Add Calendar Activity, or modify an activity using the system function, Modify Calendar Activity, you can affect these aspects of how the activity appears and acts on the calendar:

  • Name of the activity (subject).

  • Start and end day and time.

    The system requires this value in JDEUTime, even when you designate an activity as an all-day activity. You can also flag an activity for reoccurrence.

    If the start and stop times result in a span of time that is greater than or equal to 24 hours, then the system converts the activity to an all day activity. All day activities are displayed in the all day event area in the interface.

  • Additional information associated with the activity.

    You can set values for the type (meeting, appointment, and so forth), the commitment level (low, medium, or high), the activity location, and the activity organizer.

  • Private.

    This option causes the system to display a special icon next to the activity. No other logic is applied automatically, however. If you wish to restrict access to an event marked private, then you must do so within the application.

  • Font, color, and icons.

    You can set the font and related attributes, set a background color, and associate an icon with any activity. The icons from which you have to choose must already reside in the system. To add an icon to the list, save a GIF-type graphic in both of these locations: the B9\<pathcode>\res folder on the machine where FDA is located and the webclient.war/img/res folder on the machine or machines hosting the web server.

    When modifying an event, ensure that the ID value for the event exactly matches the ID as it appears in the table. For example, if the table column is left-padded, you must prefix the event ID as it appears in the control with the same number of characters that have been added to the event ID in the table because of the column formatting.

    When you delete an activity using the system function, Delete Calendar Activity, you remove it from the calendar control; you do not remove it from the database. You can choose to delete a single activity or multiple ones. You can also choose to clear the control of all activities.

In some cases, it might be helpful to assign different classifications to different date ranges. Typical classifications include working and nonworking (for example, holidays). Use Set Work Day Hours and Set Work Week to designate work time. Currently, Set Work Day Hours only affects full hours; it cannot accept half-hour increments, for example.

Furthermore, the work week must not contradict the work week system settings for the current country. For example, in the US, work weeks cannot end on Sunday or start on Saturday. Additionally, a work week cannot span these start and stop days. For example, you cannot start a work week on a Tuesday and end on a Monday.

Use Set Day Type to classify days as belonging to any other special categories.

The calendar control can provide users with three views: day, week, and month. Use Select Calendar View to display the calendar in a specific view type. You can also prevent users from being able to see a particular view type with Set View Visible.

The calendar control also provides an Add button. To change the text on the Add button, use Set Add Button Text. To hide the Add button and therefore prevent users from adding their own activities, use Set Add Button Visible.

Note: The Add button has no underlying logic. If you choose to display the button, you should assign it some function on the Add Activity Button Clicked event.