shahriyar3/filament-calendar
A calendar integration for Filament PHP that adds interactive scheduling views to your admin panel, making it easy to display and manage date-based records alongside your existing resources.
composer require <vendor>/filament-jalali-calendar). Confirm the package supports Filament v5 in its composer.json.php artisan vendor:publish --tag="filament-jalali-calendar-config"
php artisan vendor:publish --tag="filament-jalali-calendar-assets"
php artisan filament:assets
->plugin(JalaliCalendarPlugin::make())
php artisan optimize:clear and php artisan filament:optimize-clear.Where to look first
README.md for the exact field class name and configuration options.src/ for the form component (likely JalaliDatePicker or CalendarPicker) and any plugin class.config/ for default calendar mode, locale, and asset paths.resources/views and resources/js if you need to customise rendering or debug front‑end behaviour.First use case
Replace a standard Filament DatePicker in a resource form so users can pick dates in Jalali or Gregorian:
use Vendor\FilamentJalaliCalendar\Forms\Components\JalaliDatePicker;
JalaliDatePicker::make('birth_date')
->label('Birth date')
->required();
The field should output a standard date string (typically Gregorian Y-m-d) for persistence, while displaying the selected calendar to the user.
->form([JalaliDatePicker::make('created_at')])).->calendar('jalali'), ->calendar('gregorian'), ->calendar('both')). Defaults usually come from the config file.Y-m-d. Ensure your model casts are set:
protected $casts = ['birth_date' => 'date'];
Verify whether the package converts Jalali input to Gregorian before saving; if it stores Jalali strings, add conversion logic in the model or a form dehydrateStateUsing callback.TextColumn::make('birth_date')->formatStateUsing(fn ($state) => ...) with a Jalali converter (e.g. hekmatinasser/verta or morilog/jalali) to display Persian dates.->rules(['date']), ->beforeOrEqual('today')). Test Jalali‑specific boundaries (leap years, month lengths).fa if the package uses translations. Otherwise set labels and placeholders manually.mount and save handle the date value consistently.composer.json ("vendor/package": "^1.0") and test thoroughly before production.php artisan filament:assets after install and after upgrades.dehydrateStateUsing or model mutator to normalise to Gregorian.date (no time) and avoid datetime casts unless necessary.->direction('rtl') or rely on locale; test the picker’s popover positioning.composer dump-autoload), and that the correct field class is imported. Use php artisan about to confirm providers.final, extend it to override behaviour. Watch for events or macros exposed by the package.How can I help you explore Laravel packages today?