marcinmisiak/yii2-fullcalendar6

Yii2 widget & asset bundle for FullCalendar v6, vendored locally (no npm-asset/composer version conflicts with other FullCalendar packages)

Maintainers

Package info

github.com/marcinmisiak/yii2-fullcalendar6

Type:yii2-extension

pkg:composer/marcinmisiak/yii2-fullcalendar6

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-07-06 13:32 UTC

This package is auto-updated.

Last update: 2026-07-06 13:32:27 UTC


README

Yii2 widget & asset bundle for FullCalendar v6, vendored locally as static files (no npm-asset/fullcalendar composer dependency), so it can be installed alongside older FullCalendar-based packages (e.g. edofre/yii2-fullcalendar, philippfrenzel/yii2fullcalendar) without any version conflict.

Installation

Via a VCS repository (until/unless this package is published on Packagist):

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/marcinmisiak/yii2-fullcalendar6"
    }
],
"require": {
    "marcinmisiak/yii2-fullcalendar6": "dev-master"
}

Usage

<div id="grafik"></div>

<?php
echo \marcinmisiak\yii2fullcalendar6\Fullcalendar::widget([
    'options'  => ['id' => 'grafik'],
    'jsVar'    => 'grafikCalendar', // window.grafikCalendar
    'events'   => $urlEvents,       // JSON feed URL or array of events
    'clientOptions' => [
        'allDaySlot'  => false,
        'selectable'  => true,
        'editable'    => true,
    ],
    'select'      => "function(info) { /* ... */ }",
    'eventClick'  => "function(info) { /* ... */ }",
    'eventDrop'   => "function(info) { /* ... */ }",
    'eventResize' => "function(info) { /* ... */ }",
]);
?>

The widget renders the <div> container itself — remove the standalone one above if you pass 'options' => ['id' => '...'].

Afterwards, from any other script on the page, call instance methods via the configured jsVar:

window.grafikCalendar.refetchEvents();
window.grafikCalendar.unselect();

Callbacks

select, eventClick, eventDrop, eventResize, eventDidMount accept a raw JS function body string (function(info) { ... }), following FullCalendar v6's single-info-object callback API — see https://fullcalendar.io/docs/v6 for the shape of info per callback.

License

MIT. Bundles FullCalendar's own MIT-licensed Standard distribution unmodified — see LICENSE.