定制 mrezanomani/livewire-jalali-datepicker 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

mrezanomani/livewire-jalali-datepicker

最新稳定版本:v1.0.2

Composer 安装命令:

composer require mrezanomani/livewire-jalali-datepicker

包简介

A lightweight Jalali datepicker for Livewire 3

README 文档

README

A lightweight, Alpine.js-based Jalali (Persian) datepicker for Laravel Livewire 3 — with full Livewire 3 support, wire:model compatibility, and no need for jQuery or npm packages.

✅ Features

  • Jalali (Persian) calendar support
  • Compatible with Livewire 3
  • Alpine.js powered
  • Lightweight, no Vue/React
  • Optional time selection
  • Works out of the box via CDN

📦 Installation

1. Install via Composer (local or from GitHub)

composer require mrezanomani/livewire-jalali-datepicker

If installing from GitHub directly, use:

composer require mrezanomani/livewire-jalali-datepicker:@dev

📁 Publish views (optional)

If you want to customize the blade view:

php artisan vendor:publish --tag=views

🛠 Setup JS & CSS (via CDN)

Add the following to your main Blade layout (e.g. resources/views/layouts/app.blade.php):

In <head>:

<link
  rel="stylesheet"
  href="https://unpkg.com/persian-datepicker@1.2.0/dist/css/persian-datepicker.min.css"
/>

Before closing </body> tag:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://unpkg.com/persian-date@1.1.0/dist/persian-date.min.js"></script>
<script src="https://unpkg.com/persian-datepicker@1.2.0/dist/js/persian-datepicker.min.js"></script>

ℹ️ No need to use npm or Vite build. This component works with CDN scripts!

✅ Usage

In any Blade file:

<x-jalali-datepicker
    wire:model="date"
    format="YYYY-MM-DD"
    :with-time="false"
/>

In Livewire component:

public string $date = '';

🧩 Parameters

Prop Type Description
wire:model string Livewire bound model
format string Output format (default: YYYY-MM-DD)
with-time boolean Enable time picker (default: false)

🤝 Contributing

Pull requests are welcome!
If you encounter a bug or want a new feature, feel free to open an issue.

📄 License

MIT © Mrezanomani

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-07