PHPackages                             yafet/amharic-datepicker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. yafet/amharic-datepicker

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

yafet/amharic-datepicker
========================

A modern Ethiopian (Amharic) calendar datepicker for Laravel 12/13.

v1.0.5(1mo ago)0143↑150%MITPHPPHP ^8.2

Since May 6Pushed 1mo agoCompare

[ Source](https://github.com/yafetphilipos/amharic-datepicker-package)[ Packagist](https://packagist.org/packages/yafet/amharic-datepicker)[ RSS](/packages/yafet-amharic-datepicker/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (5)Dependencies (3)Versions (7)Used By (0)

Amharic Datepicker for Laravel
==============================

[](#amharic-datepicker-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f8bc445ab1e8de2bbeabbd8d283689eeb497830f2cd4a880a85c04399c4a6a33/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f79616665742f616d68617269632d646174657069636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yafet/amharic-datepicker)[![Total Downloads](https://camo.githubusercontent.com/aaee3db1322810f56933189a5b60f9e41604546b544c8f72ecee571f6756b02d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f79616665742f616d68617269632d646174657069636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yafet/amharic-datepicker)

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
==========================

[](#whats-new-in-this-version)

This release introduces a major upgrade to Ethiopian/Gregorian conversion handling and developer ergonomics.

New Features
------------

[](#new-features)

### 1. Elegant `EthiopianDate` Object

[](#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:

```
$ethDate = $calendar->fromGregorian('2024-05-06');

echo $ethDate->format('F j, Y');
// ሚያዝያ 28, 2016
```

---

### 2. Powerful Formatting Support

[](#2-powerful-formatting-support)

The new formatter supports:

FormatDescriptionExample`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:

```
$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

[](#3-graceful-gregorian-input-handling)

`fromGregorian()` now accepts multiple input types automatically.

Supported inputs:

```
$calendar->fromGregorian('2024-05-06');

$calendar->fromGregorian(new DateTime());

$calendar->fromGregorian(time());

$calendar->fromGregorian([2024, 5, 6]);
```

No manual parsing required.

---

### 4. Improved Ethiopian → Gregorian Conversion

[](#4-improved-ethiopian--gregorian-conversion)

`toGregorian()` now supports multiple Ethiopian date formats.

Supported:

```
$calendar->toGregorian(2016, 8, 28);

$calendar->toGregorian('2016-08-28');

$calendar->toGregorian('28/08/2016');
```

Returns a native `DateTime` instance.

---

### 5. New Static `now()` Helper

[](#5-new-static-now-helper)

Quickly access the current Ethiopian date.

```
$today = EthiopianCalendar::now();

echo $today->format('F j, Y');
```

Timezone supported:

```
$today = EthiopianCalendar::now('Africa/Addis_Ababa');
```

---

### 6. New Eloquent Trait

[](#6-new-eloquent-trait)

A new `HasEthiopianCalendar` trait makes Ethiopian formatting effortless inside models.

Example:

```
use Yafet\AmharicDatepicker\Traits\HasEthiopianCalendar;

class Member extends Model
{
    use HasEthiopianCalendar;

    protected $casts = [
        'dob' => 'date',
    ];
}
```

Usage:

```
{{ $member->ethiopian('dob', 'F j, Y') }}
```

Output:

```
ሚያዝያ 29, 2009

```

---

### 7. Cleaner Modern Asset Management

[](#7-cleaner-modern-asset-management)

This version introduces Vite aliases for cleaner imports.

No more ugly imports like:

```
../../public/vendor/...
```

Now simply use:

```
import amharicDatepicker from "amharic-datepicker/js/datepicker.js";
```

---

Features
========

[](#features)

- ✅ Zero jQuery
- ✅ Alpine.js powered
- ✅ Livewire compatible
- ✅ Ethiopian ↔ Gregorian conversion
- ✅ Rich Ethiopian formatting engine
- ✅ Eloquent model integration
- ✅ Inline and popup modes
- ✅ Month/year dropdown navigation
- ✅ Custom year ranges
- ✅ Timezone support
- ✅ Tailwind-friendly design
- ✅ Pagume + leap year support
- ✅ Production-ready calendar logic

---

Installation
============

[](#installation)

1. Install via Composer
-----------------------

[](#1-install-via-composer)

```
composer require yafet/amharic-datepicker
```

---

2. Publish Assets
-----------------

[](#2-publish-assets)

```
php artisan vendor:publish --tag=amharic-datepicker-assets
```

---

Modern Vite Setup (Recommended)
===============================

[](#modern-vite-setup-recommended)

vite.config.js
--------------

[](#viteconfigjs)

```
import { defineConfig } from "vite";
import laravel from "laravel-vite-plugin";
import path from "path";

export default defineConfig({
  plugins: [laravel(["resources/css/app.css", "resources/js/app.js"])],

  resolve: {
    alias: {
      "amharic-datepicker": path.resolve(
        __dirname,
        "vendor/yafet/amharic-datepicker/resources",
      ),
    },
  },
});
```

---

resources/js/app.js
-------------------

[](#resourcesjsappjs)

```
import amharicDatepicker from "amharic-datepicker/js/datepicker.js";

window.amharicDatepicker = amharicDatepicker;
```

---

resources/css/app.css
---------------------

[](#resourcescssappcss)

```
@import "amharic-datepicker/css/datepicker.css";
```

---

Usage
=====

[](#usage)

Basic Usage (Popup)
===================

[](#basic-usage-popup)

```

```

---

Livewire Usage
==============

[](#livewire-usage)

wire:model
----------

[](#wiremodel)

```

```

wire:model.live
---------------

[](#wiremodellive)

```

```

With Custom Classes
-------------------

[](#with-custom-classes)

```

```

---

Inline Calendar Mode
====================

[](#inline-calendar-mode)

```

```

---

Setting Default Values
======================

[](#setting-default-values)

```

```

---

Custom Format
=============

[](#custom-format)

```

```

---

Custom Year Range
=================

[](#custom-year-range)

```

```

---

Error Customization
===================

[](#error-customization)

By default, the component provides a premium error message design with an icon. However, you can customize it using the `error` slot to match your theme (e.g., when using **Flux** or **Volt**).

```

        @error('dob')
            {{ $message }}
        @enderror

```

---

Backend Conversion Usage
========================

[](#backend-conversion-usage)

Initialize Calendar
===================

[](#initialize-calendar)

```
use Yafet\AmharicDatepicker\EthiopianCalendar;

$calendar = new EthiopianCalendar('Africa/Addis_Ababa');
```

---

Gregorian → Ethiopian
=====================

[](#gregorian--ethiopian)

From String
-----------

[](#from-string)

```
$ethDate = $calendar->fromGregorian('2024-05-06');
```

From DateTime
-------------

[](#from-datetime)

```
$ethDate = $calendar->fromGregorian(new DateTime());
```

From Timestamp
--------------

[](#from-timestamp)

```
$ethDate = $calendar->fromGregorian(time());
```

From Array
----------

[](#from-array)

```
$ethDate = $calendar->fromGregorian([2024, 5, 6]);
```

---

Ethiopian Date Formatting
=========================

[](#ethiopian-date-formatting)

```
echo $ethDate->format('d/m/Y');
```

Output:

```
28/08/2016

```

---

```
echo $ethDate->format('F j, Y');
```

Output:

```
ሚያዝያ 28, 2016

```

---

```
echo $ethDate->format('M j');
```

Output:

```
ሚያዝ 28

```

---

Array Access Compatibility
==========================

[](#array-access-compatibility)

```
echo $ethDate['year'];

echo $ethDate['month'];

echo $ethDate['day'];
```

---

Current Ethiopian Date
======================

[](#current-ethiopian-date)

```
$today = EthiopianCalendar::now();

echo $today->format('F j, Y');
```

---

Ethiopian → Gregorian
=====================

[](#ethiopian--gregorian)

Using Integers
--------------

[](#using-integers)

```
$gregorian = $calendar->toGregorian(2016, 8, 28);
```

---

Using yyyy-mm-dd
----------------

[](#using-yyyy-mm-dd)

```
$gregorian = $calendar->toGregorian('2016-08-28');
```

---

Using dd/mm/yyyy
----------------

[](#using-ddmmyyyy)

```
$gregorian = $calendar->toGregorian('28/08/2016');
```

---

DateTime Result
===============

[](#datetime-result)

```
echo $gregorian->format('Y-m-d');
```

---

Eloquent Model Integration
==========================

[](#eloquent-model-integration)

Add Trait
---------

[](#add-trait)

```
use Yafet\AmharicDatepicker\Traits\HasEthiopianCalendar;

class Member extends Model
{
    use HasEthiopianCalendar;

    protected $casts = [
        'dob' => 'date',
    ];
}
```

---

Blade Usage
===========

[](#blade-usage)

```
{{ $member->ethiopian('dob') }}
```

Default format:

```
28/08/2016

```

---

Custom Format
=============

[](#custom-format-1)

```
{{ $member->ethiopian('dob', 'F j, Y') }}
```

Output:

```
ሚያዝያ 28, 2016

```

---

🛠 Component Props
=================

[](#-component-props)

PropDescriptionDefault`name`Input name`date``id`Input idsame as name`value`Initial Ethiopian date`null``inline`Inline calendar mode`false``format`Display format`dd/mm/yyyy``yearStart`Starting year`1900``yearEnd`Ending year`currentYear + 10``class`Custom input classes`''`---

Full Example
============

[](#full-example)

Blade
-----

[](#blade)

```

```

---

Controller
----------

[](#controller)

```
use Yafet\AmharicDatepicker\EthiopianCalendar;

$calendar = new EthiopianCalendar();

$ethiopian = $calendar->fromGregorian(now());

echo $ethiopian->format('F j, Y');
```

---

🔥 Best Practices
================

[](#-best-practices)

Always Cast Date Fields
-----------------------

[](#always-cast-date-fields)

```
protected $casts = [
    'dob' => 'date',
];
```

---

Use Addis Ababa Timezone
------------------------

[](#use-addis-ababa-timezone)

```
$calendar = new EthiopianCalendar('Africa/Addis_Ababa');
```

---

Prefer `format()` Over Manual Access
------------------------------------

[](#prefer-format-over-manual-access)

Good:

```
$date->format('F j, Y');
```

Avoid:

```
$date['month'];
```

The formatter handles localization cleanly.

---

Leap Year &amp; Pagume Support
==============================

[](#leap-year--pagume-support)

The package properly handles:

- Ethiopian leap years.
- Pagume 5/6.
- Gregorian leap year alignment.
- Historical Julian date conversion logic.

---

Credits
=======

[](#credits)

This package is a modern evolution of several outstanding Ethiopian calendar projects.

- Inspired by:
- Based on the original jQuery implementation:
- Original Ethiopian calendar algorithms by Keith Wood.

---

License
=======

[](#license)

The MIT License (MIT).

See `LICENSE.md` for more information.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance93

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

6

Last Release

33d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c143996e6996f282bcfc2fbdb059060258f8613b6c761daa9359f290698fad1?d=identicon)[yafetphilipos](/maintainers/yafetphilipos)

---

Top Contributors

[![yafetphilipos](https://avatars.githubusercontent.com/u/37532562?v=4)](https://github.com/yafetphilipos "yafetphilipos (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yafet-amharic-datepicker/health.svg)

```
[![Health](https://phpackages.com/badges/yafet-amharic-datepicker/health.svg)](https://phpackages.com/packages/yafet-amharic-datepicker)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[illuminate/pipeline

The Illuminate Pipeline package.

9348.3M264](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10533.5M984](/packages/illuminate-pagination)[illuminate/redis

The Illuminate Redis package.

8314.4M356](/packages/illuminate-redis)[spatie/laravel-export

Create a static site bundle from a Laravel app

670139.5k6](/packages/spatie-laravel-export)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
