List of Views
Web2Cal supports multiple views. This provides a great flexibility to view events without having to code for each view. Additionally, you can customize the behavior for each view. Web2Cal supports the following views. The number of views is always growing. Each view comes with many options to customize behavior.
View | Description |
---|---|
week | The Week view displays events for a week. Events are displayed within vertical timelines. If you have an "All Day" event, it will be displayed at the top of the "Week" view. |
custom | Custom view allows you to display events for a configurable X number of dates. By Default, the custom view size is 4. |
day | The Day view shows events for a specific date. |
Month | Month view displays events for a particular month. There is no timeline displayed. Only few events for a date is displayed. Other events are hidden and are shown on click of "view more" link. |
Agenda | Agenda view displays events in a list view. They are grouped by a day.You can scroll backwards and forwards to view your list of events. To display the "Agenda" view, click the "Agenda" tab on the top-right corner of the calendar. You can use the mini calendar icons to select your date range. |
workweek | The Work-Week View displays events for the working days in a particular week (monday thru friday) |
workshift (premium version only) |
Workshift view displays events / task for a person. Persons can be grouped. for example: they can be grouped by departments like Managers, Sales, Trainers and so on.. |
w2cview (premium version only) |
w2cview displays groups on x axis and events on vertical timelines. Groups could represent Persons or Resource like Converence Rooms. |
Specifying views to be displayed
Web2Cal allows you to display all or only a subset of the views mentioned above. By Default web2cal will display all the views. You can provide the list of views to web2cal during initialization. Following code will display only Day, Week and Month view.
var ical =new Web2Cal('container', {views: 'day, week, month'}
Specifying a default view
A default view is the view displayed on page load. You can specify a default view when you initialize the calendar.
var ical =new Web2Cal('container', {defaultView: 'day'});
Note: The default view specified must be one of the views that is being displayed. Web2Cal will not load if the view provided as default view is not a part of the list of views.
All Day Events
All day events are displayed on top of week / day views. You can turn off the all day feature by specifying it on load of web2cal.
Templates for a View
Web2Cal supports different preview and new event templates for each view. Prefix the view name prior to Template Name.
monthPreviewTemplate: "monthPTemplate",
weekPreviewTemplate: "weekPTemplate" });