Skip to main content
Kinetic Community

Calendar Configuration

 

A calendar configuration defines how this calendar will be displayed when it loads.  It has nothing to do with where the events that are displayed on the calendar come from.  That is the job of the event type configuration file. The calendar configuration file must be named "calendar.json" as defined on the Configuration Files page.

File Structure

Below is a sample calendar configuration file.  As with all configuration files, it uses the JSON format to define the calendar properties.

{
    "name": "Changes",
    "id": "infrastructure_change",
    "description": "Infrastructure Changes",
    "status": "Active",
    "defaultView": "Month",
    "displayPage": "/themes/default/calendar.jsp",
    "visibleInListing": true,
    "clickHandler": {},
    "eventTypeOrder": [
        "Requested Changes",
        "Scheduled Changes",
        "Completed Changes"
    ]
}
 
Unlike the connections configuration, Kinetic Calendar only expects one group of calendar properties in this file.  So the file does not begin with an opening bracket and end with a closing bracket like the connections file does.
 
On line 1, there is a opening brace which indicates the start of the calendar properties collection.  This collection is grouped until a paired closing brace is encountered, which occurs at the end of the file on line 13.  The lines between these are basically just a key/value pair of data that define individual pieces of data about the calendar.  The exception is on line 8 where an ordered list of event types are defined to ensure they are displayed in the desired order.  Since this is an ordered list of multiple properties, an array (brackets) is used to denote this.
 
Line 2 defines the name of the calendar.  The name is important because it is used on the Home page to list all the active calendars, and it is also used on the main calendar page when viewing the calendar.  The name can be any value, and does not need to be unique in the system.
 
IMPORTANT
Notice that line 2 has a comma at the end of the line.  This indicates there are more properties that belong in this collection.
 
Line 3 is the calendar id.  This value must be unique from other calendars in the system, but otherwise can be just about any value.
 
Line 4 is the description, which is not required but it does show up on the Home page when listing all the active calendars, as well as in the Admin Console when displaying all the configured calendars in the sytem.
 
Line 5 indicates the status of the calendar.  Only "Active" calendars will be listed on the home page and are accessible.  A user trying to access an inactive calendar will only see an error page.
 
Line 6 defines the default view.  Kinetic Calendar offers four views - Day, Week, Month, and List.  By default Month view is used when the calendar page is loaded, but this configuration property can change that behavior by assigning a different value.
 
Line 7 defines the JSP page that will be used to render the calendar.  Kinetic Calendar comes with a default theme that includes a calendar JSP page, but additional themes can be loaded into the web application, so this property allows the calendar to use a differnt theme page.  See Themes.
 
Line 8 is an optional property to indicate if the calendar should be visible in the calendar listing on the home page.  If this property is not supplied, the default value will be to list the calendar.
 
Line 9 is an optional property that defines the action that is taken when a user clicks an open time slot in either the day or week view.  The action can call a javascript function that does something custom, or open a URL that may allow the user to create a new event.
 
Line 10 is another optional property that defines the order event types will be displayed when the calendar page is displayed.  Since this property defines an ordered list of items, array brackets are used to indicate this.  The event type names are then listed in the desired order they should appear.
 
IMPORTANT
Notice that line 14 is the end of the properties and does not have a comma at the end of the line.  A comma would indicate there is at least one more property is in the list, but since this is the last, a comma here would make file contain invalid syntax.
 
 

Calendar Properties

Some of the properties used in the listing above are nice to define in the calendar configuration, but not all are required.  Some properties can assume a default value if not provided.
 
This is a listing of all the calendar properties, indicating which ones are required, and what the default values are for those that are not required.
 
Property Name Required? Description
name Yes The name of the calendar, used on the home page when listing active calendars, the Admin Console when listing configured calendars, and on the calendar display page.
id Yes The unique calendar identifier
description No A comment describing the nature of the calendar.  Default value is blank string.
status Yes Active or Inactive
defaultView No Indicates what view the calendar should initially load (Day, Week, Month, List).  Default value is Month.
displayPage No Indicates the JSP that should be used to display the calendar.  Default value is /themes/default/calendar.jsp
visibleInListing No Indicate if the calendar should be visible in the calendar listing on the home page.  Default value is true, the calendar will be listed.
clickHandler No Click handlers define an action that fires when the user clicks an empty time slot in either the day or week calendar view.  See the Click Handlers page for details.
eventTypeOrder No An ordered list (array) of event type names listed in the order they should be listed on the calendar view.  Default is to list the event types alphabetically by name.
fixedTimezone No Name of the TimeZone - such as ("America/Los_Angeles") that will be used to display all events.

 

Below is an image of the calendar view that end user will see.  It shows the event types listed in the specified order.  If the order wasn't specified, the Completed Changes would have been displayed at the top of the list since it is sorted first alphabetically.

 

Detail-EventTypes.png