Calendar View Module Offering Simplified Drupal Calendars

"It is meant to be the simplest solution to create Calendars in Drupal." - Matthieu Scarset
 calendar planner agenda schedule concept
Freepik

Meet Calendar View Module, the very lightweight and straightforward new addition to the Drupal ecosystem crafted by Matthieu Scarset. Introduced in August 2020, this module is not just a tool—it's a revolution in simplifying the intricate process of calendar creation. For those of you who remember the monster of a Calendar module that existed in Drupal 7, the Calendar View Module is petite!

Imagine a Drupal experience where building a calendar is not a cumbersome task but a breeze, requiring just a few clicks. The Calendar View module brings this vision to life, making it accessible even for users with limited technical expertise. Stripping away dependencies and sidestepping the need for JavaScript, paves the way for a user-friendly and efficient approach to calendar creation.

Matthieu Scarset has a track record of crafting short, simple utility modules to solve specific use cases. The new addition to the fit is the Calendar View Module, while the module description is up to date on Drupal.org, Matthieu joined Alka Elizabeth, a sub-editor at The DropTimes in an email correspondence to share more about the Calendar View Module.

Compatibility is the cornerstone of the Calendar View module, seamlessly blending with various entity types and widely-used Drupal modules, including Date range, Smart Date, recurring dates, and multi-value fields. Its prowess extends across different date field types, offering users complete control over how their results are displayed, be it individual fields or the entire entity.

Screenshot
Style options available in the Calendar View Module

Out of the box, the module unveils monthly or weekly calendar displays with Ajax navigation, allowing users to effortlessly explore content by month or week. Users can customize their calendars to support one or several date fields across one or all bundles, with options to configure the first day of the week and other settings.

Matthieu also iterates that there are certain things to be considered when site builders choose Calendar View Module in terms of performance and usability.

"First of all, it is meant to be the simplest solution to create Calendars in Drupal. The implementation is therefore minimalistic on purpose. There is no deep support for advanced event displays. Events spanning multiple days fall under this category and it would require heavy JavaScript integration to handle them perfectly."

For those seeking complex integration of event calendars, Matthieu provides alternate module options in the description of the Calendar View module.

"Also, it is important to consider the size of the result set when building your View in particular if your view displays recurring events (e.g. using `smart_date_recurr` field for instance) or if you know there will be a lot of results (e.g. hundred or thousands). Luckily the Calendar View module provides an easy solution to prevent performance issues: simply use View filters. The module’s documentation explains how you should configure date filters to limit results in the past and future using offset values such as “-1 month” and “+1 month”."

Matthieu Scarset
Matthieu Scarset

The Calendar View module goes beyond basic functionality, offering advanced features such as support for recurring events when coupled with the Smart Date module. Users can enhance the frontend display of events spanning multiple days by enabling the calendar_view_multiday submodule, ensuring compatibility with Drupal 9.2 and above.

Creating or editing a View becomes a straightforward process with the Calendar View module. Users can add date fields in the Fields section, by selecting the "Calendar" style in the format settings. The date field(s) to be used as a source(s) in calendar settings can be easily chosen, and the rest of the calendar settings, such as the first day of the week, can be configured effortlessly.

A static demo site that once existed for showcasing the Calendar View module has been retired, recognizing that a calendar view, by its nature, is dynamic and not suited for static representation. Instead, for demo purposes, Matthiew has built this new page which will hopefully become a major website soon: https://drucal.org/

screenshot
Screenshot of the demo site created by Matthieu Scarset

The latest release on September 19, 2023, brought a focus on bug fixing for the Calendar View module, primarily addressing issues related to events' time and time zones. The maintainer has diligently worked on resolving these concerns, with most of them being nearly fixed. A final ongoing issue can be tracked at https://www.drupal.org/project/calendar_view/issues/3339333.

Notably, in the 2.1.6 release, a significant change was introduced by extracting the multiday functionalities into a separate submodule called calendar_view_multiday. This adjustment aimed to prevent compatibility issues with Drupal versions older than 9.2. 

While the roadmap for the Calendar View Module is still in the process of being fully defined, the focus of future development will primarily target the front end and display aspects. 

"For the next minor version (e.g. 2.2.x) I am working on a better code base for CSS-related development. Taking an example from core themes such as Olivero, the module will use PostCSS files for a better developer experience and ultimately for a better UX by allowing other contributors to create more skins more easily in the future."

adds Matthieu along with a few other suggestions for more Calendar View displays and options such as:

  1. Compatibility with Webform submission
  2. Better navigation system with more options like switching between displays (Month, Week, Day) and Jump to month/year (link to issue on d.o)
  3. More display options like Display hours, an Agenda display, subscribe to calendars (this will be a submodule), and more accessibility (link to issue on d.o)
    … and many more things, the sky’s the limit!
     

While the Calendar View module boasts an array of features, it's important to note some limitations. If a date field from a relationship is used, it needs to be added to the View, though it can be excluded from the display. The module is not highly compatible with grouping, and further testing and feedback are encouraged in this regard.

For those interested in contributing to the Calendar View Module, a valuable starting point is to focus on creating additional tests and aiding in the integration of the module with Drupal Gitlab CI/CD, a contribution that would be highly beneficial.

"Also, starting from 2.2.x, there will be a solid codebase for contributors to create more skins/layouts. This can help the module a lot."

concludes Matthieu. 

The community is invited to join the conversation on the Calendar View Module by connecting on the #calendar-view channel on Slack. Detailed instructions on how to join Drupal Slack can be found here.

In terms of project information, the Calendar View module falls under the Views category in the Drupal ecosystem. It seamlessly integrates with the Calendar, View, and Smart Date modules, reflecting its adaptability to various Drupal environments. Currently, 1,803 sites report using this module, 

The Calendar View module was also featured as the Module of the Week #324 by Talking Drupal which provides more insights into the module.

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please let us know in the comments below and we will try to address the issue as best we can.

Advertisement Here

Upcoming Events

Latest Opportunities

Advertisement Here