Download the PHP package aliqasemzadeh/livewire-jalali-date-picker without Composer
On this page you can find all versions of the php package aliqasemzadeh/livewire-jalali-date-picker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aliqasemzadeh/livewire-jalali-date-picker
More information about aliqasemzadeh/livewire-jalali-date-picker
Files in aliqasemzadeh/livewire-jalali-date-picker
Package livewire-jalali-date-picker
Short Description A Livewire component for Jalali (Persian) date picker with AlpineJS
License MIT
Informations about the package livewire-jalali-date-picker
Livewire Jalali Date Picker
A Livewire component for Jalali (Persian) date picker with AlpineJS.
Features
- Jalali (Persian) calendar support
- Leap year calculation for Esfand (اسفند) month
- Year selection with both input field and dropdown options
- Month selection with proper Jalali month names
- Day selection that adjusts based on the selected month and year
- Inline or column layout options
- Default to today's date option
- Fully customizable through configuration
Requirements
- PHP 8.0 or higher
- Laravel 8.0 or higher
- Livewire 2.0 or higher
- AlpineJS
Installation
You can install the package via composer:
After installing the package, you can publish the config file with:
You can also publish the views if you need to customize them:
Usage
In your Livewire component, you can use the JalaliDatePicker like this:
And in your Blade view:
Available Properties
The JalaliDatePicker component accepts the following properties:
| Property | Type | Default | Description |
|---|---|---|---|
| wire:model | string | - | The property to bind the selected date to |
| year-input | boolean | false | Whether to use an input field for the year (true) or a dropdown (false) |
| default-today | boolean | true | Whether to default to today's date if no value is provided |
| inline-layout | boolean | true | Whether to display inputs in a row (true) or in columns (false) |
Example
Configuration
You can configure the default settings for the JalaliDatePicker component in the config/livewire-jalali-date-picker.php file:
Testing
License
The MIT License (MIT). Please see License File for more information.
AI Created
This package was developed with the assistance of artificial intelligence technologies:
Development Process
- Initial Design: The component architecture and API were designed with the help of GPT-4, focusing on developer experience and Laravel best practices.
- Code Generation: Core functionality was scaffolded using AI code generation, then manually refined and tested.
- Documentation: This documentation was enhanced with AI assistance to ensure clarity and completeness.
AI Benefits in This Package
- Optimized Algorithms: The Jalali calendar calculations were optimized through AI analysis of different implementation approaches.
- Consistent Styling: Component styling and structure follow consistent patterns recommended by AI based on modern web development practices.
- Comprehensive Testing: Test cases were expanded using AI-suggested edge cases for date handling.
Human Oversight
While AI played a significant role in development, all code was reviewed, tested, and refined by human developers to ensure:
- Security best practices are followed
- Performance is optimized for Laravel applications
- The component integrates seamlessly with Livewire and Alpine.js
If you have suggestions for improvements or encounter any issues, please feel free to contribute or open an issue on the GitHub repository.
All versions of livewire-jalali-date-picker with dependencies
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0
livewire/livewire Version ^2.0|^3.0
nesbot/carbon Version ^2.0|^3.0