承接 aloko/nova-persian-datepicker 相关项目开发

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

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

aloko/nova-persian-datepicker

最新稳定版本:v0.1.1

Composer 安装命令:

composer require aloko/nova-persian-datepicker

包简介

Persian Datepicker for Laravel Nova.

README 文档

README

Description

This package adds flexibility to work with Persian/Jalali dates in Laravel Nova resources. It provides two fields, PersianDate and PersianDateTime.

Installation and Usage

You may require this package using composer:

composer require aloko/nova-persian-datepicker

To use these fields, you add the following to your resource's fields() method:

use Aloko\PersianDatepicker\PersianDate;
use Aloko\PersianDatepicker\PersianDateTime;

PersianDate::make('date_of_birth'), // For date fields
PersianDateTime::make('check_in') // For datetime fields

NOTE: Please don't forget to cast your date and datetime fields in your model class as explained in Attribute Casting in Laravel Docs, otherwise these fields will throw casting error.

How it Works

Under the hood, this package uses the awesome Babakhani Datepicker library. Below screenshots are some samples of how this package works.

Screenshots

Persian Date Field

You can also select gregorian date using the same datepicker.

Persian Date Time Field

The datetime field will also have a time picker.

Methods

You can use format() method as below to alter the way dates are displayed. Please note that format string must match the standard explained in Babakhani Persian Date format docs.

PersianDate::make('date_of_birth')->format('YYYY-MM'), // This will only print year and month
PersianDateTime::make('check_in')->format('hh:mm') // This will only show hours and minutes

To Do

Below are items that needs to or will be improved in future.

  • Better locale support
  • Make it possible to accept almost all datepicker options available on PHP side for customization

Special Thanks

License

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

统计信息

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

GitHub 信息

  • Stars: 20
  • Watchers: 2
  • Forks: 3
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-08-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固