承接 ariaieboy/filament-jalali-datetimepicker 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ariaieboy/filament-jalali-datetimepicker

最新稳定版本:3.0.2

Composer 安装命令:

composer require ariaieboy/filament-jalali-datetimepicker

包简介

This is my package filament-jalali-datetimepicker

README 文档

README

Filament Jalali Date Time Picker Field

Ariaieboy Jalali Date Picker Latest Version on Packagist GitHub Actions Workflow Status Total Downloads

This package adds jalali support to filament v3 DatePicker and DateTimePicker.

For Filament v2 you can use the version 1 of this package.

Installation

You can install the package via composer:

composer require ariaieboy/filament-jalali-datetimepicker

Usage

use Ariaieboy\FilamentJalaliDatetimepicker\Forms\Components\JalaliDatePicker;
use Ariaieboy\FilamentJalaliDatetimepicker\Forms\Components\JalaliDateTimePicker;
\Filament\Forms\Components\DatePicker::make('birth_date')->jalali();

\Filament\Forms\Components\DateTimePicker::make('birth_date')->jalali(weekdaysShort: true);

for more information check the default DateTimePicker Docs : https://filamentphp.com/docs/2.x/forms/fields#date-time-picker

Changelog

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

Upgrading

v2 to v3

  • step 1: Change the package version in your composer.json to ^3 and run the composer update command:
        "ariaieboy/filament-jalali-datetimepicker": "^3",
  • step 2 : If you using the JalaliDateTimePicker or JalaliDatePicker classes you should remove those and use the default Filament DatePicker class.
    • For more info check the step 2 of the v1 to v2 upgrade guide.
  • step 3 (optional) : in V3 we introduced 2 new lang files called months and days using these 2 file you can customize the months and days labels.
    • To customize the lang files you can use this command:
      • php artisan vendor:publish --tag=filament-jalali-datetimepicker-translations
  • backward compatibility checks:
    • in V3 we changed some default values if you want to customize these values, you should use the methods after the jalali method.
      1. The default day label is long to change this you should pass true as the first jalali(weekdaysShort: true) argument.
      2. We changed the default start of the week to saturday
      3. the default format is changed to Y-m-d and Y-m-d H:i:s for datePicker and dateTimePicker
    • We changed the underlying package that provide jalali compatibility for dayjs to @calidy/dayjs-calendarsystems
    • In V3 we only support laravel >= 11 and php >= 8.2

v1 to v2

  • step 1:Change the package version in your composer.json to ^2 and run the composer update command:
        "ariaieboy/filament-jalali-datetimepicker": "^2",
  • step 2 (optional):

    You can change jalaliDatePicker and jalaliDateTimePicker to the default DatePicker and DateTimePicker and then use jalali() method to convert a datepicker to jalali format For example:

//convert
JalaliDateTimePicker::make('birth_date'),
// to 
Forms\Components\DateTimePicker::make('birth_date')->jalali(),
//and
//convert
JalaliDatePicker::make('birth_date'),
//to
\Filament\Forms\Components\DatePicker::make('birth_date')->jalali()

The old format will work in v2 but we might remove it in the next major versions.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

统计信息

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

GitHub 信息

  • Stars: 24
  • Watchers: 2
  • Forks: 1
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-06-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固