Skip to main content

EventCalendar

Namespace: Wisej.Web.Ext.MobiScroll

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

The Mobiscroll Event Calendar displays a list of events in a calendar, scheduler, timeline or agenda view.

public class EventCalendar : MSWidgetBase

Constructors​

Instance member EventCalendar()​

Constructs a new instance of the EventCalendar class.

Example:

The following example creates a monthly calendar and adds an event through the Options object.

var calendar = new EventCalendar();
calendar.Options.view = new { calendar = new { type = "month" } };
calendar.Options.data = new[]
{
new { title = "Team meeting", start = new DateTime(2024, 5, 6, 9, 0, 0), end = new DateTime(2024, 5, 6, 10, 0, 0) }
};
calendar.Dock = DockStyle.Fill;
this.Controls.Add(calendar);

Instance member EventCalendar(options)​

Constructs a new instance of the EventCalendar class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example shows a list of appointments in the weekly agenda and handles the MobiScroll eventClick event.

var calendar = new EventCalendar(new
{
view = new { agenda = new { type = "week" } },
data = appointments.Select(a => new { title = a.Subject, start = a.Start, end = a.End }).ToArray()
});
calendar.AddListener("eventClick", (s, e) => AlertBox.Show(e.Data.@event.title));
calendar.Dock = DockStyle.Fill;
this.Controls.Add(calendar);

Implements​