PHP code example of rendane / filament-jalali

1. Go to this page and download the library: Download rendane/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/ */

    

rendane / filament-jalali example snippets


use Rendane\FilamentJalali\Forms\Components\JalaliDatePicker;

JalaliDatePicker::make('birth_date')
    ->label('تاریخ تولد')
    ->

JalaliDatePicker::make('published_at')
    ->displayFormat('Y/m/d')
    ->format('Y-m-d');

JalaliDatePicker::make('due_date')
    ->minDate(now())
    ->maxDate(now()->addYear());

use Rendane\FilamentJalali\Tables\Columns\JalaliTextColumn;

JalaliTextColumn::make('created_at')
    ->label('تاریخ')
    ->jalaliDate()
    ->jalaliDateTimeTooltip();

JalaliTextColumn::make('created_at')
    ->jalaliDate('l j F Y');

use Rendane\FilamentJalali\Support\JalaliFormatter;

JalaliFormatter::format($record->created_at);                 // 1404/01/01
JalaliFormatter::format($record->created_at, 'Y/m/d H:i');    // 1404/01/01 14:30
bash
php artisan filament:assets