shalior/filament-persian-date-field 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

shalior/filament-persian-date-field

最新稳定版本:v2.0.1

Composer 安装命令:

composer require shalior/filament-persian-date-field

包简介

A FilamentPhp form field to pick persian dates

README 文档

README

Latest Version on Packagist Total Downloads

filament-demo

Installation

You can install the package via composer:

composer require shalior/filament-persian-date-field

To use with filament v2 use version ^1

You can publish the config file with:

php artisan vendor:publish --tag="filament-persian-date-field-config"

Usage

You'll use this component with Filament forms.

It syncs the related gregorian date (as string: Y-m-d) with your LiveWire component. Use the field like any other filament form fields:

    protected function getFormSchema(): array
    {
        return [
            \Shalior\FilamentPersianDateField\Components\PersianDatePicker::make('persianDate')
            ->id('persian-date')
            ->maxDate(now()->format('Y-m-d'))
            ->minDate(now()->subWeek()->format('Y-m-d'))
            ->withoutTime()
            ->viewMode('month') // accepts 'day', 'month', 'year'
            ->default('2022-04-28'),
        ];
    }

Persian date table column

You can use this field as a column in your table:

The column assumes you've installed verta or morilog/jalali if neither of them is installed, it will use Carbon's translatedFormat()

    Shalior\FilamentPersianDateField\Columns::make('created_at')
        ->translateLabel()
        ->format('Y/m/d') // default is 'H:i:s Y/m/d'
        ->timeZone('Asia/Tehran'), // default is 'Asia/Tehran'
        // renders as: ۱۳۹۹/۰۸/۰۱ in the table

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

I Encourage you to do so.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 2.98k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 19
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 19
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-04-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固