See Also

Enumerations

Name Values
This class exposes no enumerations.

Constants

Name Type Value
ViewDayAgenda Integer 3
ViewDayBasic Integer 4
ViewMonth Integer 0
ViewWeekAgenda Integer 1
ViewWeekBasic Integer 2

Events

Definition Description
DateSelected( DateStart as Date, DateEnd as Date = nil, StartTime as Boolean = False, EndTime as Boolean = False ) Raised when the user clicks on a day/time on the calendar.
EventChanged( theEvent as GraffitiWebCalendarEvent ) Fires when the user changes an event (such as by dragging).
EventMouseEnter( theEvent as GraffitiWebCalendarEvent, X as Integer, Y as Integer ) Raised when the user moves their mouse in to an event.
EventMouseLeave( theEvent as GraffitiWebCalendarEvent ) Raised when the use moves their mouse out of an event.
EventSelected( theEvent as GraffitiWebCalendarEvent ) Raised when the user clicks an event.
LanguagesLoaded( CalLanguages() as String ) This event is raised once the calendar has completely loaded the list of available languages, and facilitates dynamic locale selection.
ViewChanged( NewView as Integer, StartDate as Date, EndDate as Date ) Fired when the user changes the view (IE: from Month to Week to Day).

Methods

Definition Description
AddEvent( newEvent as GraffitiWebCalendarEvent ) Add a new event to the calendar.
AddExternalSource( URL as String, BGColor as Color = &c3a87ad, BorderColor as Color = &c3a87ad, TextColor as Color = &cFFFFFF ) Add an external source to the calendar, such as a Google Calendar feed.
AddRestriction( theRestriction as GraffitiWebCalendarRestriction ) Adds a view restriction.
DeselectAll() Deselect all selected dates and events.
FindEvent( theID as Integer ) As GraffitiWebCalendarEvent Used to find an event by ID, and return the event object.
FindEventIndex( theID as Integer ) as Integer Used to find an event by ID, and return an integer index.
ICSExport( Domain as string ) as String Exports all current events to ICS format.
ICSImport( theICS as string ) Imports ICS-formatted event data to GraffitiWebCalendar events.
MoveNext() Move to the next Month/Week/Day
MoveNextYear() Move to the next year.
MovePrev() Move to the previous Month/Week/Day
MovePrevYear() Move to the previous year.
MoveToDate( theDate as Date ) Bring theDate in to view.
MoveToToday() Move the view to show the current date.
RefetchEvents() Causes the calendar to refetch all events. Useful if changes are made to an external source.
RemoveAllEvents() Removes all events from the calendar.
RemoveAllRestrictions() Removes all restrictions from the calendar view.
RemoveEvent( theEvent as GraffitiWebCalendarEvent ) Remove the supplied event object from the calendar.
RemoveExternalSource( URL as String ) Remove the external source signified by URL.
RemoveRestriction( theID as String ) Removes a restriction from the calendar view.
RerenderEvents() Forces the calendar to rerender all events. Useful if you notice any weirdness.
SelectDates( StartDate as Date, EndDate as Date ) Selects a range of dates in the view.
UpdateEvent( theEvent as GraffitiWebCalendarEvent ) Updates theEvent. The GraffitiWebCalendarEvent object passed should be the same one that has been modified.

Properties

Name Type Default Value Description
CalendarView Integer 0 The current view state.
CustomTheme Boolean False Determines whether the calendar is to use a custom theme. This can either be in the form of the WebStyle properties, or a jQuery UI theme CSS file added to the page with a WebPageSource.
Editable Boolean True Determines if events are editable in the display by, for example, dragging.
Events() GraffitiWebCalendarEventItem Nil The array of events that the calendar currently contains.
Language String “en” The short language string which determines the locale of the calendar. Currently contains: “en”, “ar-ma”, “ar-sa”, “ar”, “bg”, “ca”, “cs”, “da”, “de-at”, “de”, “el”, “en-au”, “en-gb”, “es”, “fa”, “fi”, “fr-ca”, “fr”, “hi”, “hr”, “hu”, “id”, “is”, “it”, “ja”, “ko”, “lt”, “lv”, “nl”, “pl”, “pt-br”, “pt”, “ro”, “ru”, “sk”, “sl”, “sr-cyrl”, “sr”, “sv”, “th”, “tr”, “uk”, “vi”, “zh-cn”, “zh-tw”
RestrictView Boolean False Restricts the view to the restrictions provided via AddRestriction.
ShowDayButton Boolean True Determines if the “Day” view selector is visible.
ShowMonthButton Boolean True Determines if the “Month” view selector is visible.
ShowNavButtons Boolean True Determines if the Prev/Next navigation buttons are visible.
ShowTitle Boolean True Whether the calendar shows the title (IE: October 2014).
ShowTodayButton Boolean True Determines if the Today button is displayed.
ShowWeekButton Boolean True Determines if the Week button is displayed.
ShowYearButtons Boolean True Determines if the Year navigation buttons are displayed.
StyleDayFuture WebStyle Nil WebStyle for a day following Today.
StyleDayPast WebStyle Nil WebStyle for a day the precedes today.
StyleToday WebStyle Nil WebStyle for the current day.
StyleFridayHeader WebStyle Nil WebStyle for the Friday header.
StyleMondayHeader WebStyle Nil WebStyle for the MondayHeader.
StyleSaturdayHeader WebStyle Nil WebStyle for the SaturdayHeader.
StyleSundayHeader WebStyle Nil WebStyle for the SundayHeader.
StyleThursdayHeader WebStyle Nil WebStyle for the ThursdayHeader.
StyleToolbar WebStyle Nil WebStyle for the toolbar area.
StyleToolbarButtons WebStyle Nil WebStyle for the toolbar buttons.
StyleTuesdayHeader WebStyle Nil WebStyle for the TuesdayHeader.
StyleWednesdayHeader WebStyle Nil WebStyle for the WednesdayHeader.
TimeMinimum Date Nil Restricts new event creation to time between TimeMinimum and TimeMaximum. Both must be set for effect.
TimeMaximum Date Nil Restricts new event creation to time between TimeMinimum and TimeMaximum. Both must be set for effect.
ViewDate Date Nil The starting day of the view, if set internally. Otherwise, any date may be provided to update the view.

Examples

See the demo project for examples.

  • Last modified: 13 months ago
  • by agcyphers