A comprehensive calendar module for the SilverStripe CMS with event management, recurring events, and category organization.
- SilverStripe CMS ^5.0
- SilverStripe Lumberjack ^3.0
- Nesbot Carbon ^3.0
- Symbiote GridField Extensions ^4.0
- Symbiote Queued Jobs ^5.0
- Uncle Cheese Display Logic ^3.0
- Ryan Potter Color Field ^1.0
- DFT Frontend MultiSelectField ^1.0
composer require dynamic/silverstripe-calendar
After installation, run /dev/build?flush=all
to update your database.
See License
- Event Management: Create and manage events with comprehensive details
- Recurring Events: Support for complex recurring event patterns using Carbon
- Category Organization: Organize events with color-coded categories
- Calendar Display: Multiple view modes (month, week, day, list)
- Event Search & Filtering: Advanced filtering by category, date range, and keywords
- Admin Interface: Comprehensive CMS interface for event management
- Lumberjack Integration: Nested event management within calendar pages
- Frontend Calendar: Interactive JavaScript calendar interface
- Event Categories: Color-coded categorization system
- Responsive Design: Mobile-friendly calendar views
- Create a Calendar Page: In the CMS, create a new page of type "Calendar"
- Configure Categories: Use the Calendar Admin to create event categories
- Add Events: Create events either through the Calendar Admin or as child pages of your Calendar page
The Calendar page serves as the main container for your events and provides the frontend calendar interface.
Events can be managed in two ways:
Access through CMS Admin → Calendar to manage:
- Event Pages
- Categories
Manage events as child pages directly within your Calendar page for a hierarchical approach.
Create color-coded categories to organize your events:
- Assign colors for visual distinction
- Filter events by category
- Organize events by type, department, or any classification system
The module supports complex recurring patterns:
- Daily, weekly, monthly, yearly recurrence
- Custom recurrence rules using Carbon date manipulation
- Exception dates for holidays or special circumstances
- End dates or occurrence limits
The module provides a hybrid frontend approach:
- Primary Interface: Interactive FullCalendar.js for calendar views
- Server-Side Support: Traditional templates for custom implementations
- Responsive Design: Mobile-friendly across all view modes
The default Calendar.ss
template includes an interactive calendar powered by FullCalendar with:
- Event navigation and filtering
- Category-based color coding
- Responsive month/week/day views
- Event details modal/popover
- AJAX event loading
For custom implementations without FullCalendar, you can create server-side event listings:
<!-- Custom Calendar Template Example -->
<div class="event-listing">
<% loop $PaginatedEvents %>
<div class="event-item">
<h3><a href="$Link">$Title</a></h3>
<p class="event-date">$StartDate.Nice</p>
<% if $Category %><span class="badge" style="background-color: $Category.Color">$Category.Title</span><% end_if %>
<p>$Content.Summary(100)</p>
</div>
<% end_loop %>
<% if $PaginatedEvents.MoreThanOnePage %>
<nav class="pagination">
<% if $PaginatedEvents.NotFirstPage %>
<a href="$PaginatedEvents.PrevLink">Previous</a>
<% end_if %>
<% loop $PaginatedEvents.PaginationSummary %>
<% if $CurrentBool %>
<span class="current">$PageNum</span>
<% else %>
<a href="$Link">$PageNum</a>
<% end_if %>
<% end_loop %>
<% if $PaginatedEvents.NotLastPage %>
<a href="$PaginatedEvents.NextLink">Next</a>
<% end_if %>
</nav>
<% end_if %>
</div>
The events_per_page
configuration controls server-side pagination for custom templates.
Override templates by copying them to your theme:
Calendar.ss
- Main calendar page templateEventPage.ss
- Individual event template- Calendar JavaScript components in
client/dist/
# mysite/_config/calendar.yml
Dynamic\Calendar\Page\Calendar:
# Default events per page
events_per_page: 10
Dynamic\Calendar\Page\EventPage:
# Default event duration in hours
default_duration: 1
Categories support color customization and can be managed through the Calendar Admin interface.
Configure default recurrence options:
Dynamic\Calendar\Model\RecurringEvent:
# Maximum occurrences to generate
max_occurrences: 500
# Default recurrence end date (months from start)
default_end_months: 12
The module templates use vanilla Bootstrap classes and should work out of the box. To disable theme-specific configurations for testing:
# mysite/_config/calendar-templates.yml
Dynamic\Calendar\Page\Calendar:
# Disable theme template overrides
use_theme_templates: false
# For custom implementations without FullCalendar
Dynamic\Calendar\Page\Calendar:
# Enable server-side event listing instead of FullCalendar
enable_fullcalendar: false
The module includes a webpack-based build system for frontend assets:
# Install dependencies
npm install
# Development build
npm run build:dev
# Production build
npm run build
# Watch for changes
npm run watch
Run the test suite:
# PHPUnit tests
vendor/bin/phpunit
# Code quality
vendor/bin/phpcs src/ tests/ --standard=phpcs.xml.dist
vendor/bin/phpstan analyse src/ --configuration=phpstan.neon.dist
When upgrading from version 1.x, run the datetime conversion task:
sake dev/tasks/calendar-datetime-conversion-task
This migrates datetime data to separate date and time fields.
- Ensure Carbon ^3.0 compatibility
- Review recurring event configurations
- Run
/dev/build
to apply database changes
Events not displaying:
- Ensure
/dev/build?flush=all
has been run - Check event date ranges and publication status
JavaScript calendar not loading:
- Verify frontend assets are built (
npm run build
) - Check browser console for JavaScript errors
Recurring events not generating:
- Verify queued jobs are configured and running
- Check recurring event configuration and Carbon date logic
For large numbers of events:
- Enable query caching in your environment
- Consider pagination limits
- Use category filtering to reduce load
We welcome contributions! Please read our contributing guidelines and:
- Fork the repository
- Create a feature branch
- Write tests for new functionality
- Ensure code quality standards are met
- Submit a pull request
Bugs are tracked in the issues section of this repository. Before submitting an issue please read over existing issues to ensure yours is unique.
If the issue does look like a new bug:
- Create a new issue
- Describe the steps required to reproduce your issue, and the expected outcome. Unit tests, screenshots and screencasts can help here.
- Describe your environment as detailed as possible: SilverStripe version, Browser, PHP version, Operating System, any installed SilverStripe modules.
If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.
- SilverStripe Elemental Calendar - Elemental block integration