Attributes for Calendar Widgets
Calendar widgets are configured in the type calendarWidget or one of its subitems. They can be used to display a Microsoft Exchange calendar on the dashboard.
The attributes can be set in the page customization or they can be set in the associated Admin Tool script. Please keep in mind that the script parameters always overwrite the respective attributes.
Attributes comprise:
- General attributes
- Calendar-specific attributes
General attributes:
- localization
String. The localized title of the widget. Please see section Localization of String Values of Attributes for a detailed explanation. - title
String. The title string shown in the header bar. - visible
Boolean. Defines whether the widget is displayed, true or false.
Calendar-specific attributes:
- allDaySlot
Boolean. Determines if the "all-day" slot is displayed at the top of the calendar. Default true. - appointmentBackgroundColor
java.lang.String. Sets the background color for all appointments in the calendar. You can use any CSS color format, such as #f00, #ff0000, rgb(255,0,0), or red. - appointmentBorderColor
Sets the border color for all appointments in the calendar. You can use any CSS color format, such as #f00, #ff0000, rgb(255,0,0), or red. (java.lang.String) - appointmentColor
java.lang.String. Sets the background and border colors for all appointments in the calendar. You can use any CSS color format, such as #f00, #ff0000, rgb(255,0,0), or red. - appointmentConstraint
java.lang.String. Limits appointment dragging and resizing to certain windows of time.Possible values:
- <appointment_ID>
Appointments that are being dragged or resized must be fully contained by at least one of the appointments linked to by the given appointment ID. - businessHours
Appointments being dragged or resized must be fully contained within the week's business hours (default: Monday-Friday 9am-5pm), see businessHours attribute for details. - <start-time>-<end_time>;<days_of_week>
A custom time window in the same format as the businessHours attribute. Days of week are optional.
Examples: 10:00-18:00; 1,2,3,4 or 10:00-18:00
- <appointment_ID>
- appointmentDurationEditable
Boolean. Allows appointments' durations to be editable through resizing. Default true. - appointmentOverlap
Boolean. Determines if appointments in the calendar, when dragged and resized, are allowed to overlap each other. Default true. - appointmentStartEditable
Boolean. Allows appointments' start times to be editable through dragging. Default true. - appointmentTextColor
java.lang.String. Sets the text color for all appointments in the calendar. You can use any CSS color format, such as #f00, #ff0000, rgb(255,0,0), or red. - aspectRatio
java.lang.String. Determines the width-to-height aspect ratio of the calendar. Default value 2.8. If empty calendar component will use internal default value 1.35. - businessHours
java.lang.String. Emphasizes certain time slots in the calendar.
Format: <start-time>-<end_time>;<days_of_week>
Example: 10:00-18:00; 1,2,3,4 (from 10am to 6pm, Monday-Thursday) - calendarEventHandlerScript
java.lang.String. Name of the script which handles calendar events. Besides standard context variables like ticket, there are additional ones:- eventType
enum (values: CREATE, UPDATE, DELETE) - appointment
with appointment data (uid, subject, location, etc.).
See documentation for details. (java.lang.String)
- eventType
- calendarInitializationScript
java.lang.String. Name of the script which produces the calendar configuration. If value is empty or the script returns null the calendar won't be shown. - contentHeight
java.lang.String. Makes the calendar's content area this many pixels tall. By default, this option is not set and the calendar's height is calculated by aspectRatio. - defaultAllDayAppointmentDuration
java.lang.String. A fallback duration for all-day appointments without a specified end time value. Default value 1 (one day). - defaultDate
java.lang.String. The initial date displayed when the calendar first loads. Accepts an ISO8601 date string like 2014-02-01. - defaultTimedAppointmentDuration
java.lang.String. A fallback duration for timed appointments without a specified end time value. If not set default value will be 02:00:00 (2 hours). This attribute also affects default duration of appointments during creation. - DefaultView
java.lang.String. Default calendar view.
Possible values: month, basicWeek, basicDay, agendaWeek, agendaDay. Default agendaWeek.
View examples at Available Views. - editable
Boolean. Whether the appointments can be created, dragged and resized. This value overwrites the source configuration. Default false. - firstDay
java.lang.String. The day that each week begins with. (Sunday=0, Monday=1, Tuesday=2, etc.). If empty, value will be based on browser's locale. - forceAppointmentDuration
Boolean. A flag to force calculation of an appointment's end if it is unspecified. Default false. - handleWindowResize
Boolean. Whether to resize the calendar automatically when the browser window resizes. Default true. - headerCenter
java.lang.String. Defines the buttons and title at the top/center of the calendar. See headerLeft description for details. Default title. - headerLeft
java.lang.String. Defines the buttons and title at the top/left of the calendar. Comma- or space-separated list values (values separated by a comma will be displayed adjacently). Default prev,next today.Possible values:
- title
Text containing the current month/week/day. - prev
Button for moving the calendar back one month/week/day. - next
Button for moving the calendar forward one month/week/day. - prevYear
Button for moving the calendar back on year. - nextYear
Button for moving the calendar forward one year. - today
Button for moving the calendar to the current month/week/day. - <view name>
Button that will switch the calendar to any of the available views (see defaultView description for available views).
Header will disappear if all three header* attributes (Center, Left, Right) are empty.
- title
- headerRight
java.lang.String. Defines the buttons and title at the top/right of the calendar. See headerLeft attribute description for details. Default month,agendaWeek. - height
java.lang.String. Sets the height, in pixels, of the entire calendar (including header). By default, this option is not set and the calendar's height is calculated by aspectRatio. - hiddenDays
java.lang.String. Excludes certain days of the week from being displayed. Comma separated list of day-of-week indices (Example: 1,3,5). Each index is zero-based (Sunday=0) and ranges from 0-6. - lazyFetching
Boolean. Determines when appointment fetching should occur. See detailed documentation. Setting this attribute to false makes sense when there are a lot of external changes to the user's calendar. Default true. - maxTime
java.lang.String. Determines the end time (exclusively) which will be displayed, even if the scrollbars have been scrolled all the way down. Default value is 24:00:00. - minTime
java.lang.String. Determines the starting time that will be displayed, even if the scrollbars have been scrolled all the way up. Default value is 00:00:00. - nextDayThreshold
java.lang.String. When an appointment's end time spans into another day, the minimum time it must be in order for it to render as if it were on that day. Default: 09:00:00 (9am). Only affects timed appointments that appear on whole days. Whole day cells appear in month view, basicDay, basicWeek and the all-day slots in the agenda views. - readable
Boolean. Determines if the user can see the calendar entries. Set true to make the calendar entries visible and false if the user should not see the calendar entries. In the latter case, the calendar widget is still displayed. Only available if the calendar is displayed as a calendar widget on the dashboard. - rightToLeftMode
Boolean. If enabled, displays the calendar in right-to-left mode. Default false. - scrollTime
java.lang.String. Determines how far down the scroll pane is initially scrolled. Default is 06:00:00 (6am). - slotAppointmentOverlap
Boolean. Determines whether timed appointments in agenda view should visually overlap. Default true. - slotDuration
java.lang.String. The frequency for displaying time slots. Default is 00:30:00 (30 minutes). - snapDuration
java.lang.String. The time interval at which a dragged appointment will snap to the agenda view time grid. Also affects the granularity at which selections can be made. Default value is set to slotDuration. - state
java.lang.String. The visibility mode of the section, possible values are [expanded, collapsed, collapsed_and_preload, hidden]. Default: expanded. Only available if the calendar is displayed on the ticket, customer, or resource page. - weekNumbers
Boolean. Determines if week numbers should be displayed in the calendar. Default true. - weekends
Boolean. Whether to include Saturday/Sunday (i.e., weekend) columns in any of the calendar views. Default true.