1. Go to this page and download the library: Download ariaieboy/filament-jalali library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ariaieboy / filament-jalali example snippets
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\DateTimePicker;
DatePicker::make('birth_date')->jalali();
DateTimePicker::make('birth_date')->jalali(weekdaysShort: true);
use Filament\Tables\Columns\TextColumn;
TextColumn::make('created_at')->jalaliDate();
TextColumn::make('created_at')->jalaliDateTime();
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();
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 like
DateConstraint::make('created_at')->operators([
IsJalaliAfterOperator::class,
IsJalaliBeforeOperator::class,
IsJalaliDateOperator::class,
IsJalaliYearOperator::class
]);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.