This package adds Jalali/Shamsi support to filament v4 for filament v3 check branch v1.
We have Jalali/Shamsi support for DatePicker,DateTimePicker,TextColumn, TextEntry and DateConstraint.
It's a replacement for ariaieboy/filament-jalali-datetime and ariaieboy/filament-jalali-datetimepicker. For Upgrade guide check here
You can install the package via composer:
composer require ariaieboy/filament-jalali
use Filament\Forms\Components\DatePicker;use Filament\Forms\Components\DateTimePicker;Â DatePicker::make('birth_date')->jalali();DateTimePicker::make('birth_date')->jalali(weekdaysShort: true);
For more information check the default DateTimePicker Docs
use Filament\Tables\Columns\TextColumn;Â TextColumn::make('created_at')->jalaliDate();TextColumn::make('created_at')->jalaliDateTime();
For more information check the default TextColumn Docs
use Filament\Infolists\Components\TextEntry;Â TextEntry::make('created_at')->jalaliDate();TextEntry::make('created_at')->jalaliDateTime();TextEntry::make('created_at')->since()->jalaliDateTooltip();TextEntry::make('created_at')->since()->jalaliDateTimeTooltip();
For more information check the default TextEntry Docs
 use Filament\Tables\Filters\QueryBuilder\Constraints\DateConstraint;use Ariaieboy\FilamentJalali\DateConstraint\Operators\IsJalaliAfterOperator;use Ariaieboy\FilamentJalali\DateConstraint\Operators\IsJalaliBeforeOperator;use Ariaieboy\FilamentJalali\DateConstraint\Operators\IsJalaliDateOperator;use Ariaieboy\FilamentJalali\DateConstraint\Operators\IsJalaliYearOperator; DateConstraint::make('created_at')->jalali();//Or you can use any operations that you likeDateConstraint::make('created_at')->operators([ IsJalaliAfterOperator::class, IsJalaliBeforeOperator::class, IsJalaliDateOperator::class, IsJalaliYearOperator::class]);
For more information check the default DateConstraint Docs
We don't support
IsJalaliMonthOperatorsince there is not and efficient way to query georgian month according to the jalali/shamsi month.
Fill free to open a PR that adds
IsJalaliMonthOperatorif you have an algorithm to convert jalali/shamsi month to georgian month.
Please see CHANGELOG for more information on what has changed recently.
v1If you are using the V1 of the ariaieboy/filament-jalali you need to change the package version in your composer.json to
{ "require": { "ariaieboy/filament-jalali": "^2.0" }}
Then run composer update command.
ariaieboy/filament-jalali-datetimepickerIf you are using the V3 of the jalali-datetimepicker you don't need to do anything just replace ariaieboy/filament-jalali-datetimepicker with ariaieboy/filament-jalali
ariaieboy/filament-jalali-datetimeIf you use the jalaliDate() and jalaliDateTime() on the TextColumn you can upgrade without any problem.
But if you use the JalaliDateTimeColumn you need to change it to TextColumn and convert dateTime() to jalaliDateTime() and date() to jalaliDate()
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.