dacoo / calengrid
A Filament calendar grid package rendered without a calendar JavaScript library.
Requires
- php: ^8.3
- filament/filament: ^5.0
- spatie/laravel-package-tools: ^1.92
Requires (Dev)
- orchestra/testbench: ^11.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
This package is not auto-updated.
Last update: 2026-05-09 03:27:24 UTC
README
A Filament v5 calendar plugin rendered with PHP, Blade, Livewire, Alpine, and CSS.
This package intentionally does not depend on a calendar-specific JavaScript library. It ships month, week, and day views with server-side layout calculations and a small Alpine module for client-side drag and resize handoff to Livewire.
Quick start (Eloquent-backed events)
Subclass CalendarWidget, point it at a model, and provide a Filament form schema. That's it — the package queries the model, fills in the calendar, and wires up create / view / edit / delete modals plus drag-and-drop persistence:
namespace App\Filament\Widgets; use App\Models\Event; use Dacoo\Calengrid\Widgets\CalendarWidget; use Filament\Forms\Components\{DateTimePicker, TextInput}; use Filament\Schemas\Components\Grid; use Illuminate\Database\Eloquent\Model; class EventCalendar extends CalendarWidget { public Model | string | null $model = Event::class; public function getFormSchema(): array { return [ TextInput::make('title')->required(), Grid::make(2)->schema([ DateTimePicker::make('starts_at')->required(), DateTimePicker::make('ends_at')->required(), ]), ]; } }
The default fetchEvents() queries $model for rows whose starts_at / ends_at overlap the visible window. Column names are overridable: eventStartColumn(), eventEndColumn(), eventTitleColumn().
What you get for free:
- + Create in the toolbar opens the form schema and saves a new
Event. - Click an event → view modal of the form schema with Edit / Delete in the footer.
- Drag to move, resize the bottom edge to extend → both update the record's start / end columns.
If your events aren't backed by a single Eloquent row (recurring occurrences, synthetic feeds, external APIs), override fetchEvents() to build the events yourself, and override persistEventDrop() / persistEventResize() to plug in your own persistence.
Publishing
Both the config and the views are publishable so consumers can override defaults and customize markup without forking the package.
Config
php artisan vendor:publish --tag=calengrid-config
Publishes to config/calengrid.php. Each setting is documented inline — locale, first day, slot minutes, view limits, date formats, and more.
Views
php artisan vendor:publish --tag=calengrid-views
Publishes the Blade templates to resources/views/vendor/calengrid/. Laravel will load these in preference to the package's bundled views, so any edits you make there override the originals.
Common targets:
widgets/calendar.blade.php— toolbar and view switcher.widgets/partials/event.blade.php— event badge markup (title, time label).widgets/partials/month.blade.php,week.blade.php,day.blade.php— per-view grids.
Note: published views are copies. They will not pick up upstream changes when the package is updated — re-publish (or diff) after major upgrades.