GraffitiCalendar

View Categories

Images #

About #

GraffitiCalendar is an advanced calendar-view class. It allows for the addition of events to a calendar by using Xojo date objects, with support for a wide variety of views and allows for event dragging and resizing. Includes support for a large number of languages built-in, jQuery UI theme support, and Google Calendar imports.

Features:

  • Supports many different languages/locales
  • 9 view types
  • First day of week setting
  • Custom theming with jQuery UI
  • Google Calendar import

Enumerations #

Name Values
Views Month
MonthList
WeekAgenda
WeekBasic
WeekList
DayAgenda
DayBasic
DayList
YearList

Constants #

Name Type Value
This class exposes no constants.

Events #

Definition Parameters Return Type Description
DayClick theDay as DateTime None Fired when the user clicks on a day in the calendar.
theView as GraffitiCalendar.Views
Deselected None None Fired when selected date is deselected.
EventChanged target as GraffitiCalendarEvent None Fired when the user moves or resizes an event.
EventClick target as GraffitiCalendarEvent None Fired when the user clicks on an existing event.
EventMouseOut target as GraffitiCalendarEvent None Fired when the user’s mouse exits an existing event.
EventMouseOver target as GraffitiCalendarEvent None Fired when the user’s mouse enters an existing event.
LanguagesLoaded None None Fired when the control has loaded all available languages.
Selected startDate as DateTime, endDate as DateTime None Fired when a date or time range is selected.
ViewChanged None None Fired when the user switched the view using the toolbar.

Methods #

Definition Parameters Return Type Description
AddEvent newEvent as GraffitiCalendarEvent None Adds a new event to the calendar.
AddExternalSource GoogleCalendarID as String None Adds a Google Calendar to the display.
GoogleCalendarKey as String
BGColor as Color = &c3a87ad
BorderColor as Color = &c3a87ad
TextColor as Color = &cFFFFFF
DeselectAll None None Deselects all currently selected dates.
DisableDay day as DateTime None Disables the specified day.
EnabledDay day as DateTime None Enabled the specified day.
HideDaysOfWeek days() as Integer None Hides the specified days of the week. Values are 0-6 starting with Sunday.
HideDaysOfWeek ParamArray days as Integer None Hides the specified days of the week. Value are 0-6 starting with Sunday.
FindEvent eventID as String GraffitiCalendarEvent Returns an event object by the assigned ID.
FindEventIndex theID as String Integer Returns the integer index of an event object by the assigned ID.
ICSExport Domain as String String Returns all events in ICS format.
ICSImport theICS as String None Imports events in an ICS-formatted string.
LoaderHide None None Hides the loading spinner.
LoaderShow None None Shows a loading spinner that covers the entire component.
LoadTheme themeURL as String None Applies a jQuery UI theme to the calendar.
MoveNext None None Navigates to the next day/week/month in the display.
MoveNextYear None None Navigates to the next year.
MovePrev None None Navigates to the previous day/week/month in the display.
MovePrevYear None None Navigates to the previous year.
MoveToDate theDate as Date None Navigates to the defined date.
MoveToToday None None Resets the display to display the current date.
RefetchEvents None None Re-imports external event sources.
RemoveAllEvents None None Removes all events from the calendar.
RemoveEvent theEvent as GraffitiCalendarEvent None Removes the specified event from the calendar.
RemoveExternalSource URL as String None Removes an external source.
RerenderEvents None None Forces the display to update.
RestrictEventDisplay Boolean False When True, events will only be displayed that fall within the period specified by Restriction.
Restriction GraffitiCalendarRestriction Nil Used to restrict display or interaction to a specified timeframe.
RestrictSelection Boolean False When True, only those dates within the Restriction will be selectable.
RestrictView Boolean False When True, only those dates within the Restriction will be visible.
SelectDates StartDate as Date None Selects the specified date range.
EndDate as Date = Nil)
UpdateEvent theEvent as GraffitiCalendarEvent None Updates an event in the calendar after changing properties of the Event object.
ViewEnd ReadOnly DateTime Nil The last day/time visible in the current view.
ViewStart ReadOnly DateTime Nil The first day/time visible in the current view.

Properties #

Name Type Default Value Description
BackgroundColor Color &cFFFFFF The background color of the display.
CustomTheme Boolean False If True, uses the theme loaded by LoadTheme.
Editable Boolean True If False, will not allow the user to move or resize events.
FirstDayOfWeek Integer -1 First day of the week, -1 is the current locale default, 0-6 are Sunday through Saturday.
Language String “en” The current view language.
Languages String() Nil Array of supported languages. This should be, more or less, static.
ShowDayViewButton Boolean True Shows the “Day” button on the display.
ShowLoaderOnEvents Boolean False If true, the loading spinner will be shown to denote that the control is busy when communicating.
ShowMonthViewButton Boolean True Shows the “Month” button on the display.
ShowNavButtons Boolean True Shows the previous/next buttons for navigation.
ShowTitle Boolean True Shows the title area which contains the current view’s date range.
ShowTodayButton Boolean True Shows a button allowing the user to quickly shift the view back to the current day.
ShowWeekViewButton Boolean True Shows the “Week” button on the display.
ShowYearNavButtons Boolean True Shows the previous/next year navigation buttons.
TextSize Integer 12 The default base-line text size for the display.
UseXHR Boolean False When True, will use XmlHttpRequests to return data rather than length-constrained packets.
View Views MonthList The current display style.

Examples #

There are currently no examples for this class.