Skip to main content

Event

Namespace: Wisej.Web.Ext.FullCalendar

Assembly: Wisej.Web.Ext.FullCalendar (4.1.0.0)

Represents an event in the FullCalendar control.

public class Event

Add events to the calendar using Events. Once an event belongs to a calendar, changing any of its properties fires EventChanged and reloads the events on the client.

Example:

Creating a timed event and an all-day event:

var meeting = new Event("m42", new DateTime(2026, 10, 7, 14, 0, 0), TimeSpan.FromHours(1))
{
Title = "Budget meeting",
ToolTipText = "Room 3, bring the Q3 figures",
BackgroundColor = Color.DarkOrange
};
this.fullCalendar1.Events.Add(meeting);
this.fullCalendar1.Events.Add(new Event(new DateTime(2026, 10, 9)) { Title = "Release day" });

Constructors​

Instance member Event()​

Constructs a new instance of Event.

Instance member Event(id)​

Constructs a new instance of Event.

NameTypeDescription
idStringA string that represents the ID of this event.

Throws:

Instance member Event(day)​

Constructs a new instance of an all-day Event.

NameTypeDescription
dayDateTimeThe DateTime date of the all-day event.

Instance member Event(start, end)​

Constructs a new instance of Event.

NameTypeDescription
startDateTimeThe starting DateTime date and time of the event.
endDateTimeThe ending DateTime date and time of the event.

Instance member Event(start, duration)​

Constructs a new instance of Event.

NameTypeDescription
startDateTimeThe starting DateTime date and time of the event.
durationTimeSpanThe TimeSpan duration of the event.

Instance member Event(id, day)​

Constructs a new instance of an all-day Event.

NameTypeDescription
idStringA string that represents the ID of this event.
dayDateTimeThe DateTime date of the all-day event.

Throws:

Instance member Event(id, start, end)​

Constructs a new instance of Event.

NameTypeDescription
idStringA string that represents the ID of this event.
startDateTimeThe starting DateTime date and time of the event.
endDateTimeThe ending DateTime date and time of the event.

Throws:

Instance member Event(id, start, duration)​

Constructs a new instance of Event.

NameTypeDescription
idStringA string that represents the ID of this event.
startDateTimeThe starting DateTime date and time of the event.
durationTimeSpanThe TimeSpan duration of the event.

Throws:

Properties​

Instance member AllDay​

Boolean: Returns or sets whether this is an all-day event.

The constructors that take a single day create all-day events. The value is updated when the user drags the event in or out of the all-day slot.

Instance member BackgroundColor​

Color: Returns or sets the background color for this event.

When empty, the event uses EventBackgroundColor.

Instance member BorderColor​

Color: Returns or sets the border color for this event.

When empty, the event uses EventBorderColor.

Instance member ClassName​

String: Returns or sets the CSS class name (or several names separated by spaces) that will be attached to this event's element.

The CSS classes must be defined in a style sheet loaded by the application.

Example:

Styling an event with a custom CSS class:

// .urgent { font-weight: bold; } is defined in a css file loaded by the application.
this.fullCalendar1.Events["m42"].ClassName = "urgent";

Instance member Editable​

Boolean: Returns or sets whether the event can be dragged and resized by the user.

The default is true.

Instance member End​

DateTime: Returns or sets the end date/time of this event.

The end is exclusive: an all-day event that lasts two days, from October 5 to October 6, ends on October 7. The value is updated when the user drags or resizes the event. Changing the value of an event that belongs to a calendar fires EventChanged and reloads the events on the client.

Example:

Creating a three day all-day event:

var trip = new Event(new DateTime(2026, 10, 5)) { Title = "Trade fair" };
trip.End = new DateTime(2026, 10, 8);
this.fullCalendar1.Events.Add(trip);

Instance member Id​

String: Returns or sets the unique ID for this event.

An empty string is converted to null. Events added to Events without an ID receive an automatic ID ("event_1", "event_2", ...). Adding an event with the same ID of an event already in the collection replaces the existing event. The ID identifies the event in the calendar's events such as EventClick, and in virtual mode it's passed to RetrieveVirtualEvent.

Instance member ResourceId​

String: Returns or sets the id of the SchedulerResource associated to this event.

Must match the Id of one of the resources in Resources. The value is updated when the user drags the event to a different resource.

Instance member Start​

DateTime: Returns or sets the start date/time of this event.

The value is updated when the user drags or resizes the event; in that case EventChanged is fired with the previous value. Changing the value of an event that belongs to a calendar fires EventChanged and reloads the events on the client.

Instance member TextColor​

Color: Returns or sets the text color for this event.

When empty, the event uses EventTextColor.

Instance member Title​

String: Returns or sets the title of this event.

Instance member ToolTipText​

String: Returns or sets the text that appears when the mouse pointer hovers over the event. 3.5.13+ (Default: null)

Value: The text that appears when the mouse pointer hovers over a Event.

The ToolTip is displayed only when ShowEventToolTips is true. When the value is null, the ToolTip shows the Title.

Instance member UserData​

Object: Returns a dynamic object that can be used to store custom data.

The object is created the first time the property is read.

Example:

Storing the database key of an appointment:

var ev = this.fullCalendar1.Events.Add(new DateTime(2026, 10, 7, 9, 0, 0), TimeSpan.FromHours(1));
ev.Title = "Dentist";
ev.UserData.AppointmentId = 1234;

Reading the value when the event is clicked:

private void fullCalendar1_EventClick(object sender, EventClickEventArgs e)
{
int id = e.Event.UserData.AppointmentId ?? 0;
OpenAppointment(id);
}