aliromero / nova-jalali-date-field
Laravel Nova Jalali/波斯日期/日期时间字段。
1.0.10
2023-09-29 00:18 UTC
Requires
- php: ^8.0
- laravel/nova: ^4.0
README
为Laravel Nova提供的波斯/贾拉利日期/日期时间资源字段
要求
php: ^8.0
laravel/nova: ^4.0
安装
使用Composer将包安装到使用Nova的Laravel应用中
composer require aliromero/nova-jalali-date-field
用法
将字段添加到资源中的fields
方法
use Romero\PersianDateField\PersianDate; use Romero\PersianDateField\PersianDateTime; PersianDate::make('DueOn') ->color('rgb(30, 136, 229)') // customize color ->format('jYYYY/jMM/jDD') // customize display format ->min('lastmonth') // customize min date ->max('today') // customize max date ->locale('fa,en'), // customize locale PersianDateTime::make('PublishedAt') ->color('rgb(30, 136, 229)') // customize color ->format('jYYYY/jMM/jDD HH:mm:ss') // customize display format ->min('lastmonth') // customize min date ->max('today') // customize max date ->locale('fa,en'), // customize locale
该字段扩展了Laravel\Nova\Fields\Field
字段,因此所有常用方法都可用。
建议您包含标准的date_format
验证规则,因为它不会自动添加。