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
Requirements #
This class is not supported on Linux due to limitations in Xojo.Enumerations #
Name | Values |
---|---|
Views | Month |
MonthList | |
WeekAgenda | |
WeekBasic | |
WeekList | |
DayAgenda | |
DayBasic | |
DayList | |
YearList | |
WeekNumberLocations | SeparateColumn |
InFirstDay | |
WeekNumberTypes | Local |
ISO |
Constants #
This product 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. |
EventDropped | newEvent as GraffitiCalendarEvent | None | Raised upon completion of a BeginExternalDrag process. newEvent will contain the updated information about the DateTime in which the GraffitiCalendarEvent was placed. |
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 | |||
BeginExternalDrag | newEvent as GraffitiCalendarEvent | None | Begins the process to drag an object from outside the calendar to create an event within the calendar. |
DeselectAll | None | None | Deselects all currently selected dates. |
DisableDay | day as DateTime | None | Disables the specified day. |
EventAt | index as Integer | GraffitiCalendarEvent | Returns the event at the specified index in the calendar’s internal array. |
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. |
LastIndex | None | Integer | Returns the index of the last item in the control’s internal array. |
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. |
RemoveEventAt | index as Integer | None | Removes the event at the specified index in the control’s internal array. |
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. |
ScrollTo | eventObject as GraffitiCalendarEvent | None | Scrolls the supplied event in to the calendar’s view. |
ScrollTo | time as DateTime | None | Scrolls the specified DateTime in to the calendar’s view. |
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. |
ShowAllDaySlot | Boolean | True | Controls visibility of the row containing events that span entire days in applicable views. |
ShowDayViewButton | Boolean | True | Shows the “Day” button on the display. |
ShowEventTooltips | Boolean | True | When True, tooltips will be automatically displayed for events on hover within the calendar. Tooltip content is the event’s Description. |
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. |
ShowWeekNumbers | Boolean | False | Determines whether week numbers will be displayed. |
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. |
View | Views | MonthList | The current display style. |
WeekNumberLocation | WeekNumberLocations | SeperateColumn | Determines where week numbers are displayed. |
WeekNumberType | WeekNumbersTypes | Local | Determines what week number type to display. If you wish Week 1 to always be numbered “1” then use WeekNumberTypes.ISO |
Examples #
There are currently no examples for this class.