A premium, modern Ethiopian (Amharic) calendar datepicker for Laravel 11, 12, and 13. Built with **Alpine.js** and **Vanilla JS**, this package replaces legacy jQuery-based solutions with a sleek, performant, and developer-friendly component.
# Amharic Datepicker for Laravel
A premium, modern Ethiopian (Amharic) calendar datepicker for Laravel 11, 12, and 13.
Built with **Alpine.js** and **Vanilla JavaScript**, this package replaces outdated jQuery-based implementations with a clean, modern, high-performance experience for both developers and end users.
It includes:
- A fully interactive Ethiopian calendar datepicker UI.
- Seamless Livewire integration.
- Elegant Ethiopian ↔ Gregorian date conversion utilities.
- Powerful Ethiopian date formatting helpers.
- Eloquent model integration.
- Timezone-aware backend conversion support.
- Zero jQuery dependency.
---
# What's New in This Version
This release introduces a major upgrade to Ethiopian/Gregorian conversion handling and developer ergonomics.
## New Features
### 1. Elegant `EthiopianDate` Object
Conversions now return a dedicated `EthiopianDate` object instead of a raw array.
This provides:
- Rich formatting support.
- Array-style access compatibility.
- Cleaner Blade rendering.
- Safer date handling.
Example:
```php
$ethDate = $calendar->fromGregorian('2024-05-06');
echo $ethDate->format('F j, Y');
// ሚያዝያ 28, 2016
```
---
### 2. Powerful Formatting Support
The new formatter supports:
| Format | Description | Example |
| ------ | -------------------------- | ------- |
| `d` | Day with leading zero | `01` |
| `j` | Day without leading zero | `1` |
| `m` | Month with leading zero | `08` |
| `n` | Month without leading zero | `8` |
| `F` | Full Amharic month name | `ሚያዝያ` |
| `M` | Short Amharic month name | `ሚያዝ` |
| `Y` | Ethiopian year | `2016` |
Examples:
```php
$date->format('d/m/Y');
// 28/08/2016
$date->format('F j, Y');
// ሚያዝያ 28, 2016
$date->format('M j');
// ሚያዝ 28
```
---
### 3. Graceful Gregorian Input Handling
`fromGregorian()` now accepts multiple input types automatically.
Supported inputs:
```php
$calendar->fromGregorian('2024- …