PHPackages                             mokhosh/filament-jalali - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mokhosh/filament-jalali

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mokhosh/filament-jalali
=======================

Add Jalali datetime to your filament tables

v5.1.0(10mo ago)7048.1k↓38%17[3 issues](https://github.com/mokhosh/filament-jalali/issues)[1 PRs](https://github.com/mokhosh/filament-jalali/pulls)2MITJavaScriptPHP ^8.2CI passing

Since Jul 22Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/mokhosh/filament-jalali)[ Packagist](https://packagist.org/packages/mokhosh/filament-jalali)[ Docs](https://github.com/mokhosh/filament-jalali)[ RSS](/packages/mokhosh-filament-jalali/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (10)Dependencies (10)Versions (37)Used By (2)

Add "Jalali calendar" columns and pickers to Filament
=====================================================

[](#add-jalali-calendar-columns-and-pickers-to-filament)

[![Latest Version on Packagist](https://camo.githubusercontent.com/217ba690aabc66042ffb1c0573b1d5b1a09763b9588670f987fc431ac468fd0c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f6b686f73682f66696c616d656e742d6a616c616c692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mokhosh/filament-jalali)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/3b8aab2946fdebf53357bd7d80beb3e654c838127757769532778ee13e4c271d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6f6b686f73682f66696c616d656e742d6a616c616c692f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/mokhosh/filament-jalali/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/ec8f21e1be33d882d898c0d1bc48638aee8d27e644656c30d3cd52537921ab31/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f6b686f73682f66696c616d656e742d6a616c616c692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mokhosh/filament-jalali)

[![Jalali datetime picker form component and table text column](https://raw.githubusercontent.com/mokhosh/filament-jalali/main/art/readme.jpg)](https://raw.githubusercontent.com/mokhosh/filament-jalali/main/art/readme.jpg)

No fuss package to add Jalali Date and DateTime columns to your table, and a beautiful Jalali Date and DateTime picker to your forms. No new column type, just keep using your good old `TextColumn`s! No new form components, just keep using your beautiful `DatePicker`s and `DateTimePicker`s!

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require mokhosh/filament-jalali
```

Usage
-----

[](#usage)

To add Jalali date and date-time columns to your tables, just add `jalaliDate` and `jalaliDateTime` to the filament `TextColumn`s instead of `date` or `dateTime`.

```
// Yes! Just use Filament's original TextColumns!
use Filament\Tables;

Tables\Columns\TextColumn::make('created_at')
    ->jalaliDate(),
Tables\Columns\TextColumn::make('updated_at')
    ->jalaliDateTime(),
```

To add Jalali date and date-time columns to your infolists, just add `jalaliDate` and `jalaliDateTime` to the filament `TextEntry`s instead of `date` or `dateTime`.

```
use Filament\Infolists\Components;

Components\TextEntry::make('created_at')
    ->jalaliDate(),
Components\TextEntry::make('updated_at')
    ->jalaliDateTime(),
```

To add Jalali date and date-time pickers to your forms, just add `jalali`to your `DatePicker` and `DateTimePicker`.

```
// Yes! Just use Filament's original DatePickers and DateTimePickers!
use Filament\Forms;

Forms\Components\DatePicker::make('moderated_at')
    ->jalali(),
Forms\Components\DateTimePicker::make('published_at')
    ->jalali(),
```

Ignoring Jalali Conversion
--------------------------

[](#ignoring-jalali-conversion)

If you want to ignore jalali conversion you can use the `when` and `unless` methods:

```
use Filament\Tables;
use Filament\Infolists\Components;
use Filament\Forms;
use Illuminate\Support\Facades\App;

Tables\Columns\TextColumn::make('created_at')
    ->date()
    ->when(App::isLocale('fa'), fn (TextColumn $column) => $column->jalaliDate()),

Components\TextEntry::make('updated_at')
    ->dateTime()
    ->unless(App::isLocale('en'), fn (TextColumn $column) => $column->jalaliDateTime()),

Forms\Components\DatePicker::make('birthday')
    ->when(App::isLocale('fa'), fn (TextColumn $column) => $column->jalali()),
```

Configuring the Format Globally
-------------------------------

[](#configuring-the-format-globally)

You can set the default date formats for tables, infolists and date/time pickers anywhere you want, likely in a service provider:

```
public function boot(): void
{
    Table::$defaultDateDisplayFormat = 'Y/m/d';
    Table::$defaultDateTimeDisplayFormat = 'Y/m/d H:i:s';

    Infolist::$defaultDateDisplayFormat = 'Y/m/d';
    Infolist::$defaultDateTimeDisplayFormat = 'Y/m/d H:i:s';

    DateTimePicker::$defaultDateDisplayFormat = 'Y/m/d';
    DateTimePicker::$defaultDateTimeDisplayFormat = 'Y/m/d H:i';
    DateTimePicker::$defaultDateTimeWithSecondsDisplayFormat = 'Y/m/d H:i:s';
}
```

Some common formats you might want to use:

`j F Y` ۱۵ مهر ۱۳۶۸

`Y/m/d` ۱۳۶۸/۰۷/۱۵

`l j F` شنبه ۱۵ مهر

Filament 4 Custom Theme Integration
-----------------------------------

[](#filament-4-custom-theme-integration)

Filament 4 uses a new theme system. To include filament-jalali’s styles in your Filament admin panel, do the following:

### 1. Create a custom Filament theme

[](#1-create-a-custom-filament-theme)

Run the artisan command:

```
php artisan make:filament-theme
```

Follow the instructions to create your custom theme (e.g., `FilamentTheme`).

---

### 2. Import filament-jalali styles in your theme’s CSS file

[](#2-import-filament-jalali-styles-in-your-themes-css-file)

Add this line to your generated theme CSS file (usually something like `resources/css/filament/admin/theme.css`):

```
@source '../../../../vendor/mokhosh/filament-jalali/resources/**/*';
```

This imports all CSS/SCSS from the filament-jalali package.

---

### 3. Add the theme CSS file to your Vite input in vite.config.js

[](#3-add-the-theme-css-file-to-your-vite-input-in-viteconfigjs)

Edit your `vite.config.js`:

```
export default defineConfig({
    // ...
    build: {
        rollupOptions: {
            input: [
                // other inputs ...
                'resources/css/filament/admin/theme.css',
            ],
        },
    },
    // ...
});
```

---

### 4. Register the compiled theme CSS file in your Filament panel provider

[](#4-register-the-compiled-theme-css-file-in-your-filament-panel-provider)

In your panel service provider (e.g., `App\Providers\FilamentServiceProvider`), add:

```
use Filament\Panel;

public function panel(Panel $panel): Panel
{
    return $panel
        // other panel config ...
        ->viteTheme('resources/css/filament/admin/theme.css');
}
```

---

### 5. Compile your assets with Vite

[](#5-compile-your-assets-with-vite)

Run:

```
npm run build
```

or for development:

```
npm run dev
```

Credits
-------

[](#credits)

- [Mo Khosh](https://github.com/mokhosh)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance55

Moderate activity, may be stable

Popularity44

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 93.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~23 days

Recently: every ~48 days

Total

36

Last Release

312d ago

Major Versions

v1.2 → v2.02023-07-24

v2.0 → v3.02023-08-03

v2.3.8 → v3.2.82024-03-06

v3.5.0 → v4.0.02024-09-08

v4.10.0 → v5.0.02025-09-06

PHP version history (2 changes)v0.1PHP ^8.1

v5.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/939919859a4e4f8e56b5771bc355135f44d98d8a3926baa6ce4358d2dc090edf?d=identicon)[mokhosh](/maintainers/mokhosh)

---

Top Contributors

[![mokhosh](https://avatars.githubusercontent.com/u/6499685?v=4)](https://github.com/mokhosh "mokhosh (108 commits)")[![MeghdadFadaee](https://avatars.githubusercontent.com/u/61308304?v=4)](https://github.com/MeghdadFadaee "MeghdadFadaee (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")[![amidesfahani](https://avatars.githubusercontent.com/u/61671721?v=4)](https://github.com/amidesfahani "amidesfahani (1 commits)")[![Milad-Sarli](https://avatars.githubusercontent.com/u/150502402?v=4)](https://github.com/Milad-Sarli "Milad-Sarli (1 commits)")[![Hebrahimzadeh](https://avatars.githubusercontent.com/u/38420287?v=4)](https://github.com/Hebrahimzadeh "Hebrahimzadeh (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

laravelmokhoshfilament-jalali

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/mokhosh-filament-jalali/health.svg)

```
[![Health](https://phpackages.com/badges/mokhosh-filament-jalali/health.svg)](https://phpackages.com/packages/mokhosh-filament-jalali)
```

###  Alternatives

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[backstage/mails

View logged mails and events in a beautiful Filament UI.

16429.7k](/packages/backstage-mails)[finity-labs/fin-mail

A powerful email template manager and composer for Filament with dynamic token replacement, template versioning, and inline email sending.

316.8k2](/packages/finity-labs-fin-mail)[stephenjude/filament-debugger

About

104173.6k2](/packages/stephenjude-filament-debugger)[tapp/filament-form-builder

User facing form builder using Filament components

133.5k6](/packages/tapp-filament-form-builder)[tapp/filament-maillog

Filament plugin to view outgoing mail

3076.0k1](/packages/tapp-filament-maillog)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
