PHP code example of aliqasemzadeh / livewire-jalali-date-picker

1. Go to this page and download the library: Download aliqasemzadeh/livewire-jalali-date-picker library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

aliqasemzadeh / livewire-jalali-date-picker example snippets




namespace App\Livewire;

use Livewire\Component;

class MyForm extends Component
{
    public $date;

    public function save()
    {
        $this->validate([
            'date' => '

return [
    // Whether to use an input field for the year (true) or a dropdown (false)
    'year_input' => false,

    // Whether to default to today's date if no value is provided
    'default_today' => true,

    // Whether to display inputs in a row (true) or in columns (false)
    'inline_layout' => true,

    // Jalali calendar months
    'months' => [
        1 => 'فروردین',
        2 => 'اردیبهشت',
        3 => 'خرداد',
        4 => 'تیر',
        5 => 'مرداد',
        6 => 'شهریور',
        7 => 'مهر',
        8 => 'آبان',
        9 => 'آذر',
        10 => 'دی',
        11 => 'بهمن',
        12 => 'اسفند',
    ],
];
bash
php artisan vendor:publish --provider="Aliqasemzadeh\LivewireJalaliDatePicker\LivewireJalaliDatePickerServiceProvider" --tag="config"
bash
php artisan vendor:publish --provider="Aliqasemzadeh\LivewireJalaliDatePicker\LivewireJalaliDatePickerServiceProvider" --tag="views"