ariaieboy / filament-jalali-datetimepicker

a Drop-in Jalali Replacement for filament DateTimePicker
MIT License
23 stars 1 forks source link
filament laravel livewire

Filament Jalali Date Time Picker Field

Ariaieboy Jalali Date Picker Latest Version on Packagist GitHub Actions Workflow Status Total Downloads

This package adds jalali support to filament v3 DatePicker and DateTimePicker.

For Filament v2 you can use the version 1 of this package.

Installation

You can install the package via composer:

composer require ariaieboy/filament-jalali-datetimepicker

Usage


use Ariaieboy\FilamentJalaliDatetimepicker\Forms\Components\JalaliDatePicker;
use Ariaieboy\FilamentJalaliDatetimepicker\Forms\Components\JalaliDateTimePicker;
\Filament\Forms\Components\DatePicker::make('birth_date')->jalali();

\Filament\Forms\Components\DateTimePicker::make('birth_date')->jalali(weekdaysShort: true);

for more information check the default DateTimePicker Docs : https://filamentphp.com/docs/2.x/forms/fields#date-time-picker

Changelog

Please see CHANGELOG for more information on what has changed recently.

Upgrading

v2 to v3

        "ariaieboy/filament-jalali-datetimepicker": "^3",

v1 to v2

        "ariaieboy/filament-jalali-datetimepicker": "^2",
//convert
JalaliDateTimePicker::make('birth_date'),
// to 
Forms\Components\DateTimePicker::make('birth_date')->jalali(),
//and
//convert
JalaliDatePicker::make('birth_date'),
//to
\Filament\Forms\Components\DatePicker::make('birth_date')->jalali()

The old format will work in v2 but we might remove it in the next major versions.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.