A Laravel Filament component that enables users to choose a specific timezone grouped by regions, with support for multiple languages.
- PHP 8.1^
- Filament v3
You can install the package via composer:
composer require omar-haris/filament-timezone-field
You can publish the translation languages files with:
php artisan vendor:publish --tag="filament-timezone-field-translations"
Supported languages
- Arabic
- English
use OmarHaris\FilamentTimezoneField\Forms\Components\Timezone as TimezoneComponent;
public static function form(Form $form): Form
{
return $form
->schema([
// ...
TimezoneComponent::make('timezone')
->searchable()
->required(),
// ...
]);
}
use OmarHaris\FilamentTimezoneField\Tables\Columns\Timezone as TimezoneColumn;
public static function form(Form $form): Form
{
return $form
->columns([
// ...
TimezoneColumn::make('timezone')
->sortable()
->toggleable(),
// ...
]);
}
use OmarHaris\FilamentTimezoneField\Tables\Filters\Timezone as TimezoneFilter;
public static function table(Table $table): Table
{
return $table
//...
->filters([
TimezoneFilter::make('timezone'),
// ...
])
}
composer test
Please see CHANGELOG for more information on what has changed recently.
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.