tattali / calendar-bundle
Provides event calendar for your Symfony 8+ project. Compatible with API like Google Calendar.
Package info
github.com/tattali/CalendarBundle
Type:symfony-bundle
pkg:composer/tattali/calendar-bundle
Fund package maintenance!
Requires
- php: >=8.4
- ext-json: *
- symfony/config: ^8.0
- symfony/dependency-injection: ^8.0
- symfony/event-dispatcher: ^8.0
- symfony/framework-bundle: ^8.0
- symfony/http-foundation: ^8.0
- symfony/http-kernel: ^8.0
- symfony/yaml: ^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.90
- infection/infection: ^0.35
- phpstan/phpstan: ^2.1
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpstan/phpstan-symfony: ^2.0
- phpunit/phpunit: ^12.4
- shipmonk/composer-dependency-analyser: ^1.8
Suggests
- doctrine/mongodb-odm-bundle: To support MongoDB.
- symfony/orm-pack: To support Doctrine ORM and Migration.
Provides
None
Conflicts
None
Replaces
None
- dev-main
- 8.x-dev
- v8.3.0
- v8.2.2
- v8.2.1
- v8.2.0
- v8.1.1
- v8.1.0
- v8.0.0
- 7.x-dev
- v7.0.5
- v7.0.4
- v7.0.3
- v7.0.2
- v7.0.1
- v7.0.0
- 6.x-dev
- v6.0.0
- 5.x-dev
- v5.0.0
- v1.3.0
- v1.2.4
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.8
- v1.1.7
- v1.1.6
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0
- dev-raise-mutation-thresholds-on-main
- dev-raise-mutation-thresholds-on-7-x
- dev-list-every-8-3-migration-step
- dev-controller-uses-interface-aliases
- dev-remove-option-with-null-value
- dev-strict-iso-8601-request-dates
- dev-final-exception-classes
- dev-final-request-parser-and-serializer
- dev-event-constructor-keeps-given-dates
- dev-immutable-request-dates
- dev-immutable-event-dates
- dev-accept-datetimeinterface-in-event-setters
- dev-timezone-support
- dev-get-requests-and-http-cache
- dev-accept-datetimeinterface-in-event-constructor
- dev-keep-start-time-across-all-day-changes
- dev-keep-start-time-when-event-stops-being-all-day
- dev-filters-bad-request
- dev-license-copyright-holder
- dev-declare-used-dependencies-on-main
- dev-run-mutation-tests-on-main
- dev-analyse-main-with-phpstan-max-and-strict-rules
- dev-test-every-php-and-symfony-8-minor-pair-on-main
- dev-regenerate-ci-workflow-on-5-x
- dev-regenerate-ci-workflow-on-6-x
- dev-regenerate-ci-workflow-on-7-x
- dev-declare-used-dependencies-on-7-x
- dev-run-mutation-tests-on-7-x
- dev-analyse-7-x-with-phpstan-max-and-strict-rules
- dev-test-every-php-and-symfony-7-minor-pair-on-7-x
- dev-declare-used-dependencies-on-6-x
- dev-declare-used-dependencies-on-5-x
- dev-run-mutation-tests-on-6-x
- dev-analyse-6-x-with-phpstan-max-and-strict-rules
- dev-answer-400-for-start-or-end-that-is-not-a-date-on-6-x
- dev-test-every-php-version-with-symfony-6-4-on-6-x
- dev-run-mutation-tests-on-5-x
- dev-analyse-5-x-with-phpstan-max-and-strict-rules
- dev-test-every-php-and-symfony-5-4-pair-on-5-x
- dev-throw-json-exception-when-events-cannot-be-encoded-on-6-x
- dev-answer-400-for-invalid-calendar-query-parameters-on-6-x
- dev-analyse-phpstan-for-php-8-1-on-6-x
- dev-read-request-params-without-request-get
- dev-return-null-for-missing-event-option-on-7-x
- dev-keep-caller-start-date-unchanged-on-7-x
- dev-return-null-for-missing-event-option-on-6-x
- dev-match-ci-workflow-of-maintenance-branches
- dev-verify-getoption-fix-with-6-x-ci
- dev-verify-getoption-fix-with-7-x-ci
- dev-verify-setstart-fix-with-7-x-ci
- dev-support-only-symfony-6-4
- dev-run-ci-workflow-on-7-x
- dev-support-only-symfony-5-4
- dev-list-supported-versions-in-readme
- dev-rework-php-cs-fixer-rules
- dev-show-badges-under-the-title
- dev-use-shared-readme-badges
- dev-align-ci-with-other-bundles
- dev-support-symfony-7.4-and-php-8.3
- dev-event-dates-datetimeinterface
This package is auto-updated.
Last update: 2026-10-19 01:30:58 UTC
README
This bundle allow you to integrate FullCalendar.js library in your Symfony 8 project.
Versions
Each major version of the bundle supports one Symfony major version:
| Bundle | Branch | Symfony | PHP |
|---|---|---|---|
| 8.x | main | 8 | 8.4+ |
| 7.x | 7.x | 7 | 8.2+ |
| 6.x | 6.x | 6.4 | 8.1+ |
| 5.x | 5.x | 5.4 | 8.0+ |
| 1.x | tags v1.* |
3.4 to 7 | 7.1+ |
New features go to main. The 7.x and 6.x branches get bug fixes, and 5.x gets security fixes only.
Documentation
The source of the documentation is stored in the docs/ folder in this bundle
Installation
composer require tattali/calendar-bundle
Import the routes:
# config/routes/calendar.yaml calendar: resource: '@CalendarBundle/config/routing.yaml'
Quick Start
Create a subscriber to populate calendar data:
// src/EventSubscriber/CalendarSubscriber.php <?php namespace App\EventSubscriber; use CalendarBundle\Entity\Event; use CalendarBundle\Event\SetDataEvent; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class CalendarSubscriber implements EventSubscriberInterface { public static function getSubscribedEvents(): array { return [ SetDataEvent::class => 'onCalendarSetData', ]; } public function onCalendarSetData(SetDataEvent $setDataEvent): void { $start = $setDataEvent->getStart(); $end = $setDataEvent->getEnd(); $filters = $setDataEvent->getFilters(); // You may want to make a custom query from your database to fill the calendar $setDataEvent->addEvent(new Event( 'Event title', new \DateTime('Tuesday this week'), new \DateTime('Wednesday this week') )); // If the end date is null or not defined, it creates a all day event $setDataEvent->addEvent(new Event( 'All day event', new \DateTime('Friday this week') )); } }
Add the calendar to your template:
{% block body %}
<div id="calendar-holder"></div>
{% endblock %}
{% block javascripts %}
<script src="https://cdn.jsdelivr.net/npm/fullcalendar@6.1.11/index.global.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', () => {
new FullCalendar.Calendar(document.getElementById('calendar-holder'), {
initialView: 'dayGridMonth',
eventSources: [{
url: '/fc-load-events',
method: 'POST',
extraParams: { filters: JSON.stringify({}) }
}]
}).render();
});
</script>
{% endblock %}
Documentation
- Configuration - Caching, JSON depth limit, routing
- Doctrine CRUD - Create, update, delete events with Doctrine
- Webpack Encore - ES6 module setup
- Multi-calendar - Multiple calendars on one page
- Security - Securing the endpoint
- Time zones - FullCalendar
timeZoneparameter and all-day dates
Upgrade Guides
Troubleshooting
Debug AJAX requests using browser Network monitor (Ctrl+Shift+E Firefox, Ctrl+Shift+I Chrome).
License
MIT - See LICENSE
