Search by

alfasix / alfakit-calendar

faizanakbar10

FullCalendar widgets for AlfaKit panels: month, week, day and list views, event actions, drag and drop.

Package info

github.com/alfasixbh/alfakit-calendar

Homepage

Issues

pkg:composer/alfasix/alfakit-calendar

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

v0.1.0 2026-10-18 13:05 UTC

This package is auto-updated.

Last update: 2026-10-18 14:00:33 UTC


README

by Alfa Six

FullCalendar widgets for AlfaKit panels: month, week, day and list views, actions on events, range selection and drag and drop, all running through AlfaKit's authorised action endpoint. The API follows saade/filament-fullcalendar.

Installation

composer require alfasix/alfakit-calendar

The FullCalendar packages ship with @alfakit/react, @alfakit/vue and @alfakit/svelte; nothing to install on the frontend.

Register

use AlfaSix\AlfakitCalendar\CalendarPlugin;

$panel->plugin(CalendarPlugin::make()->editable());

Usage

use AlfaSix\AlfakitCalendar\Event;
use AlfaSix\AlfakitCalendar\Widgets\CalendarWidget;

class MeetingsCalendar extends CalendarWidget
{
    protected static ?string $model = Meeting::class;

    protected static ?string $startAttribute = 'starts_at';

    protected static ?string $endAttribute = 'ends_at';

    public function fetchEvents(array $info): array
    {
        return Meeting::query()
            ->whereBetween('starts_at', [$info['start'], $info['end']])
            ->get()
            ->map(fn (Meeting $meeting) => Event::make($meeting)
                ->title($meeting->subject)
                ->start($meeting->starts_at)
                ->end($meeting->ends_at))
            ->all();
    }

    public function getFormSchema(): array
    {
        return [
            TextInput::make('subject')->required(),
            DateTimePicker::make('starts_at')->required(),
            DateTimePicker::make('ends_at'),
        ];
    }
}

Add the widget to a dashboard with ->widgets([MeetingsCalendar::class]). Clicking an event opens a view modal (with edit and delete), selecting a range opens a create modal, and with editable() dragging or resizing an event saves its dates.

See the documentation for every option.

License

MIT. See LICENSE.md.