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.
- 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
composer require mrezanomani/livewire-jalali-datepickerIf installing from GitHub directly, use:
composer require mrezanomani/livewire-jalali-datepicker:@devIf you want to customize the blade view:
php artisan vendor:publish --tag=viewsAdd the following to your main Blade layout (e.g. resources/views/layouts/app.blade.php):
<link
rel="stylesheet"
href="https://unpkg.com/persian-datepicker@1.2.0/dist/css/persian-datepicker.min.css"
/><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!
In any Blade file:
<x-jalali-datepicker
wire:model="date"
format="YYYY-MM-DD"
:with-time="false"
/>public string $date = '';| 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) |
Pull requests are welcome!
If you encounter a bug or want a new feature, feel free to open an issue.
MIT Β© Mrezanomani