Jalali/Shamsi Support by AriaieBOY
CommunityThis plugin adds Jalali/Shamsi Support to FilamentPHP.
Author:
AriaieBOY
Package health
Automated checks of this plugin's Composer package
15 checks
- Failed: GitHub Actions pinned to SHA — View details on Plumb
- Skipped: GitLab CI includes pinned to SHA
- Passed: Open security advisories
- Passed: Dependabot PR responsiveness — No open Dependabot PRs.
- Skipped: Renovate MR responsiveness
- Warning: Dependabot or Renovate configured — Updater does not cover the JavaScript ecosystem, which has a committed lockfile.
-
Failed:
Dependency update cooldown configured
—
No cooldown configured in
.github/dependabot.yml. View details on Plumb - Failed: Provides a security policy — View details on Plumb
- Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
- Passed: Commit and release recency — Active: last commit 34 days ago; last release 179 days ago.
-
Passed:
composer.lock not committed by library
—
composer.lockis absent from the released dist archive. - Warning: Dist archive is lean
-
Passed:
Current Laravel version supported
—
Package dependencies resolve together with current Laravel
13.0. -
Passed:
Current PHP version supported
—
Constraint
~8.2.0|~8.3|~8.4|~8.5supports current PHP8.5. - Skipped: Current Symfony version supported
filament/
namespace. Review the source and install at your own risk. Found
malware or an unresolved security issue the author won't
address?
Report it
.
Documentation
- Installation
- Usage
- Localization
- Changelog
- Upgrade
- Contributing
- Security Vulnerabilities
- Credits
- License
This package adds Jalali/Shamsi support to filament v5 for filament v4 check branch v2 and 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
#Installation
You can install the package via composer:
composer require ariaieboy/filament-jalali
#Usage
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\DateTimePicker;
DatePicker::make('birth_date')->jalali();
DateTimePicker::make('birth_date')->jalali(weekdaysShort: true);
DateTimePicker::make('birth_date')->jalali(weekdaysShort: true)->hasToday(); // add a today button that when use press on it the date will be set to today
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 like
DateConstraint::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.
#Localization
We support localization for Persian (Farsi), English, Pashto, Dari out of the box. To enable it, you need to set your application's locale to fa,en,fa_AF,ps in the config/app.php file:
'locale' => 'fa' // or 'en' for english, 'fa_AF' dari, 'ps' for pashto
You can publish the localization files to customize them:
php artisan vendor:publish --tag="filament-jalali-translations"
#Changelog
Please see CHANGELOG for more information on what has changed recently.
#Upgrade
#from v2
If you are using the V2 of the ariaieboy/filament-jalali you need to change the package version in your composer.json to
{
"require": {
"ariaieboy/filament-jalali": "^3.0"
}
}
Then run composer update command.
#from v1
If 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.
#from ariaieboy/filament-jalali-datetimepicker
If 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
#from ariaieboy/filament-jalali-datetime
If 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()
#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.
The author
From the same author
Jalali DateTime
This plugin will add a Jalali DateTime Column for filament table builder.
Author:
AriaieBOY
Currency
Currency formatting and conversion package.
Author:
AriaieBOY
Featured Plugins
A selection of plugins curated by the Filament team
Compact Theme
A theme that makes data-heavy panels easier to scan by fitting more useful information on each screen.
Filament
Advanced Tables (formerly Filter Sets)
Supercharge your tables with powerful features like user-customizable views, quick filters, multi-column sorting, advanced table searching, convenient view management, and more. Compatible with Resource Panel Tables, Relation Managers, Table Widgets, and Table Builder!
Kenneth Sese
Sharp Theme
A theme that gives panels a precise, technical look with square corners, strong borders, and clear contrast.
Filament