npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

habesha-datepicker2

v1.0.8

Published

An Ethiopian date picker component designed for React applications.

Readme

🇪🇹 Habesha DatePicker

Version: 0.2.3

A beautiful and culturally-aware Ethiopian calendar component built for modern React applications. Powered by Material-UI, habesha-datepicker simplifies date selection, supporting the Ethiopian calendar, Afan Oromo labels, and the Gregorian calendar.

🚀 Installation

To get started, install the package via npm:

npm install habesha-datepicker

Required Peer Dependencies:

This package relies on the following peer dependencies. Please ensure they are also installed in your project:

"@emotion/react": "^11.11.0",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.6",
"@mui/material": "^5.14.6",
"@mui/x-date-pickers": "^6.11.2",
"date-fns": "^2.30.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"

You can install them all at once using this command:

npm install @mui/icons-material @mui/material @mui/x-date-pickers date-fns react react-dom

🧠 Usage

Single Date Picker

Use it for selecting a single date, just like any standard date picker.

import React, { useState } from "react";
import EtDatePicker from "habesha-datepicker";

function MyComponent() {
  const [selectedDate, setSelectedDate] = useState<Date | null>(null);

  return (
    <EtDatePicker
      label="Select Document Date"
      value={selectedDate}
      onChange={(date) => setSelectedDate(date as Date | null)}
      minDate={new Date("YYYY-MM-DD")}
      maxDate={new Date("YYYY-MM-DD")}
    />
  );
}

Habesha DatePicker Screenshot


Range Picker (Start → End)

Need to select a date range? It's straightforward.

import React, { useState } from "react";
import EtDatePicker from "habesha-datepicker";

function MyRangeComponent() {
  const [dateRange, setDateRange] = useState<[Date | null, Date | null]>([null, null]);

  return (
    <EtDatePicker
      label="Select Date Range"
      isRange
      value={dateRange}
      onChange={(range) => setDateRange(range as [Date | null, Date | null])}
    />
  );
}

Habesha DatePicker Screenshot


🌍 Localization

Since version 0.1.7, the date picker offers robust localization options:

  • GC – Gregorian Calendar
  • EC – Ethiopian Calendar (Amharic)
  • AO – Afan Oromo
  • CUSTOM – Define your own calendar labels

Step 1: Wrap your application with the provider

import { EtLocalizationProvider } from "habesha-datepicker";

function MyApp({ children }) {
  return (
    <EtLocalizationProvider localType="EC"> {/* or 'AO', 'GC', 'CUSTOM' */}
      {children}
    </EtLocalizationProvider>
  );
}

Step 2: Utilize CUSTOM localization (optional)

For full control over month names, use the CUSTOM type and provide your own getLocalMonthName function:

<EtLocalizationProvider
  localType="CUSTOM"
  getLocalMonthName={(month) => ["Custom Month 1", "Custom Month 2", "Custom Month 3", "Custom Month 4", "Custom Month 5", "Custom Month 6", "Custom Month 7", "Custom Month 8", "Custom Month 9", "Custom Month 10", "Custom Month 11", "Custom Month 12", "Custom Month 13"][month - 1]}
>
  {children}
</EtLocalizationProvider>

🗓 EtDateViewer

If you simply need to display a date without the ability to edit it, the EtDateViewer component is perfect.

import { EtDateViewer } from "habesha-datepicker";

<EtDateViewer date={new Date()} sx={{ color: "blue" }} variant="h6" />;

🧰 EthiopianDateUtil

This utility provides helpful functions for working with Ethiopian dates directly.

Create a date manually

import { EthiopianDate } from "habesha-datepicker";

const newEthiopianDate = EthiopianDate.createEthiopianDateFromParts(23, 7, 2013); // Day, Month, Year

Convert between calendars

import { EthiopianDate } from "habesha-datepicker";

const ethiopianDate = EthiopianDate.toEth(new Date()); // Converts Gregorian Date to Ethiopian Date
const gregorianDate = EthiopianDate.toGreg({ Day: 23, Month: 7, Year: 2013 }); // Converts Ethiopian Date to Gregorian Date

Get all month names

Access the array of Ethiopian month names:

import { EthiopianDate } from "habesha-datepicker";

const allEthiopianMonths = EthiopianDate.ethMonths;

🛠 Support & Contributions

Encounter a bug, have an idea for improvement, or want to add a new feature? Your contributions are welcome!

  • Open an issue: Share your findings or suggestions.
  • Create a pull request: Directly contribute to the codebase.

Your support helps make this project better for everyone! 🙌