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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@alydev/datepicker

v2.1.4

Published

Accessible, headless React date picker with Gregorian and Jalali calendars, RTL, time, ranges, and TypeScript.

Downloads

52

Readme

@alydev/datepicker

An accessible, headless date picker for React 18 and 19. Calix supports Gregorian, Jalali/Persian, Hijri (Umm al-Qura), and Thai Buddhist calendars, RTL, typed date input, time selection, ranges, multiple dates, constraints, and optional CSS themes.

Documentation · Interactive playground · GitHub

Install

Install the React package with an adapter. Themes are optional.

pnpm add @alydev/datepicker @alydev/adapter-gregorian
pnpm add @alydev/themes # optional

For Jalali/Persian calendars:

pnpm add @alydev/datepicker @alydev/adapter-jalali

Hijri and Thai Buddhist adapters are available as @alydev/adapter-hijri and @alydev/adapter-buddhist.

Before rendering a picker, choose the theme route: import default.css or minimal.css once, or import neither and use your own CSS. The exact location depends on your framework—see Framework setup for Vite, Next.js App Router, and Remix.

Quick start

In Next.js App Router, import the theme in app/layout.tsx; this component must remain a client component. For the complete setup sequence, see Your first picker.

"use client";

import { useState } from "react";
import { DatePicker } from "@alydev/datepicker";
import { gregorian } from "@alydev/adapter-gregorian";
import "@alydev/themes/default.css";

export function BookingDate() {
  const [value, setValue] = useState<Date | null>(null);

  return (
    <DatePicker
      adapter={gregorian}
      locale="en-US"
      value={value}
      onChange={setValue}
      placeholder="Choose a date"
      theme="light"
    />
  );
}

Jalali and RTL

The adapter controls calendar rules; locale controls language, digits, weekday order, and direction.

import { DatePicker } from "@alydev/datepicker";
import { jalali } from "@alydev/adapter-jalali";

<DatePicker adapter={jalali} locale="fa-IR" dir="rtl" placeholder="تاریخ را انتخاب کنید" />;

What is included

  • DatePicker: ready-to-use input and accessible popover.
  • Calendar: always-visible inline calendar.
  • CalendarView, TimeField, MonthPicker, and YearPicker components.
  • Headless useCalendar, useDatePicker, useDateInput, and useTime hooks.
  • Single, multiple, and range selection; date/time picking; typed input and formatting.
  • Date constraints, business-day-only rules, custom disabled dates, and holiday data.
  • Range-length limits, regional weekends, month/focus callbacks, and one-click presets.
  • Keyboard navigation, roving focus, ARIA grid semantics, RTL, and reduced-motion support.

Common patterns

Range and multiple selection

import { Calendar, type RangeValue } from "@alydev/datepicker";

const [range, setRange] = useState<RangeValue>({ start: null, end: null });

<Calendar adapter={gregorian} mode="range" value={range} onChange={setRange} />;
<Calendar adapter={gregorian} mode="multiple" max={3} />;

Date and time

<DatePicker
  adapter={gregorian}
  withTime
  timePickerProps={{ variant: "wheel" }}
  outputPattern="yyyy-MM-dd HH:mm"
  onOutputChange={(value) => console.log(value)}
/>

onChange receives Date values. Use onOutputChange for a formatted string, or set outputFormat="json" for serialized output.

Constraints and holidays

import { iranHolidays } from "@alydev/holidays-iran";

<Calendar
  adapter={jalali}
  locale="fa-IR"
  minDate={new Date(2026, 0, 1)}
  disabledWeekdays={[5]}
  holidayData={iranHolidays}
  showHolidays
  holidaysSelectable={false}
/>;

Styling

Calix has no Tailwind or UI-kit dependency. Import an optional theme:

import "@alydev/themes/default.css";
// import "@alydev/themes/minimal.css";

Use CSS variables, classNames, renderDay, and state attributes such as data-selected, data-today, data-disabled, and data-in-range to integrate it with your design system. CalendarClassNames covers the calendar shell, header, navigation, grids, day cells, presets, footer, and month/year picker; DatePickerClassNames additionally covers the popover, field, input, toggle, clear control, and date-time step.

<Calendar
  adapter={gregorian}
  classNames={{ heading: "calendar-title", navButton: "calendar-nav", day: "calendar-day" }}
  header={(calendar) => <button onClick={calendar.goToToday}>This month</button>}
  footer={(calendar) => <button onClick={calendar.clear}>Reset</button>}
/>

header and footer can also be plain React nodes. Use their callback form to keep custom controls connected to the built-in calendar state. For complete DOM control, compose DatePicker.Root, .Input, .Trigger, and .Content, or use useCalendar directly.

Documentation and packages

License

MIT