geekstek/filament-temporal-picker
最新稳定版本:v1.0.9
Composer 安装命令:
composer require geekstek/filament-temporal-picker
包简介
A Filament 4 plugin providing flexible temporal selection components including year, month, week, weekday, and day-of-month pickers with multi-select and range support.
关键字:
README 文档
README
A Filament 4 plugin providing flexible temporal selection components including year, month, week, weekday, and day-of-month pickers with multi-select and range support.
Installation
composer require geekstek/filament-temporal-picker
Components
MonthPicker
Select a month with year navigation.
use Geekstek\TemporalPicker\Forms\Components\MonthPicker; MonthPicker::make('billing_month') ->label('Billing Month') ->required() ->minDate('2024-01') ->maxDate('2025-12') ->showYear()
Multiple Selection:
MonthPicker::make('selected_months') ->label('Select Months') ->multiple() ->minSelections(1) ->maxSelections(6)
YearPicker
Select a year from a range.
use Geekstek\TemporalPicker\Forms\Components\YearPicker; YearPicker::make('fiscal_year') ->label('Fiscal Year') ->range(2020, 2030)
Inline Grid Mode:
YearPicker::make('year') ->label('Year') ->inline() ->gridColumns(4) ->range(2020, 2025)
WeekPicker
Select a week using a calendar interface.
use Geekstek\TemporalPicker\Forms\Components\WeekPicker; WeekPicker::make('work_week') ->label('Work Week') ->yearRange(2024, 2025) ->showWeekNumber() ->weekStartsOnMonday()
WeekdayPicker
Select one or multiple days of the week.
use Geekstek\TemporalPicker\Forms\Components\WeekdayPicker; WeekdayPicker::make('working_days') ->label('Working Days') ->multiple() ->shortLabels() ->disabledOptions(['saturday', 'sunday'])
Integer Values:
WeekdayPicker::make('working_days') ->asInteger() // Returns 1-7 instead of 'monday'-'sunday'
DayOfMonthPicker
Select one or multiple days of the month (1-31).
use Geekstek\TemporalPicker\Forms\Components\DayOfMonthPicker; DayOfMonthPicker::make('billing_days') ->label('Billing Days') ->multiple() ->dayRange(1, 28) ->disabledOptions([29, 30, 31])
Dropdown Mode:
DayOfMonthPicker::make('day') ->showCalendarGrid(false) // Use dropdown instead of grid
Common Options
All temporal pickers support:
multiple(bool)- Enable multiple selectionminSelections(int)- Minimum selections required (when multiple)maxSelections(int)- Maximum selections allowed (when multiple)disabledOptions(array)- Disable specific optionslocale(string)- Set component localeformat(string)- Storage formatdisplayFormat(string)- Display formatinline(bool)- Show inline instead of dropdowngridColumns(int)- Number of grid columnsreadOnly()- Make component read-onlydisabled()- Disable the component
Configuration
Publish the config file:
php artisan vendor:publish --tag=temporal-picker-config
// config/temporal-picker.php return [ 'locale' => null, // Defaults to app locale 'first_day_of_week' => 1, // 0 = Sunday, 1 = Monday 'weekday_format' => 'string', // 'string' or 'integer' 'year_range' => [ 'min' => 1900, 'max' => 2100, ], 'formats' => [ 'year' => 'Y', 'month' => 'Y-m', 'week' => 'Y-\WW', 'date' => 'Y-m-d', ], ];
Translations
Publish translations:
php artisan vendor:publish --tag=temporal-picker-translations
Available locales: en, zh_CN
License
MIT License
统计信息
- 总下载量: 33
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-13