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

@zorvx/antd-persian-date-picker

v1.0.2

Published

Persian (Jalali) date picker for Ant Design — drop-in replacement using date-fns-jalali

Readme

@zorvx/antd-persian-date-picker

@zorvx/antd-persian-date-picker — Persian Date Picker for Ant Design

npm version license

Persian (Jalali / Shamsi) date picker for Ant Design. A drop-in replacement for Ant Design's DatePicker and RangePicker, powered by date-fns-jalali.

Works with the same props and behavior as the official Ant Design DatePicker — but displays and parses dates in the Persian calendar.

Repository: github.com/AliNAbadian/antd-range-picker


Features

  • Persian (Jalali) calendar support out of the box
  • Drop-in replacement for DatePicker and RangePicker
  • Full Ant Design DatePicker API (format, disabledDate, showTime, picker="month", etc.)
  • TypeScript support included
  • ESM and CommonJS builds
  • Optional isolated Jalali dayjs helper (subpath export)

Dependencies

Required in your project (peer dependencies)

These must be installed in the consuming app:

| Package | Version | Why | | ----------- | ---------- | ------------------------------------ | | react | >=18.0.0 | React runtime | | react-dom | >=18.0.0 | React DOM | | antd | >=5.0.0 | UI components (generatePicker API) |

Bundled with this package

| Package | Version | Why | | ----------------- | ---------- | ------------------------------------ | | date-fns-jalali | ^4.4.0-0 | Jalali calendar logic for the picker |

Optional (only for /jalali-dayjs subpath)

| Package | Version | Why | | ----------- | --------- | ------------------------------ | | dayjs | ^1.11.0 | Isolated Jalali dayjs instance | | jalaliday | ^3.0.0 | Jalali plugin for dayjs |


Installation

Main package

npm install @zorvx/antd-persian-date-picker antd react react-dom
pnpm add @zorvx/antd-persian-date-picker antd react react-dom
yarn add @zorvx/antd-persian-date-picker antd react react-dom

With optional dayjs helper

npm install @zorvx/antd-persian-date-picker antd react react-dom dayjs jalaliday

Quick start

Import Ant Design styles once in your app entry (e.g. main.tsx or _app.tsx):

import "antd/dist/reset.css";

Use the picker:

import { useState } from "react";
import PersianDatePicker, {
  PersianRangePicker,
} from "@zorvx/antd-persian-date-picker";

function App() {
  const [date, setDate] = useState<Date | null>(null);

  return (
    <>
      <PersianDatePicker
        value={date}
        onChange={setDate}
        placeholder="انتخاب تاریخ"
      />

      <PersianRangePicker placeholder={["از", "تا"]} />
    </>
  );
}

Exports

Main entry — @zorvx/antd-persian-date-picker

| Export | Type | Description | | ---------------------- | --------- | ---------------------------------------------- | | PersianDatePicker | Component | Default export — Jalali DatePicker | | PersianRangePicker | Component | Jalali date range picker | | generateJalaliConfig | Config | Low-level calendar config for generatePicker | | formatDateMMDDYYYY | Function | Formats a Date as YYYY-M-D string |

Subpath — @zorvx/antd-persian-date-picker/jalali-dayjs

| Export | Type | Description | | ------------- | -------- | ------------------------------------------------------------ | | jalaliDayjs | Function | Pre-configured Jalali dayjs (does not affect global dayjs) | | Dayjs | Type | dayjs instance type |


Usage examples

Single date picker

import PersianDatePicker from "@zorvx/antd-persian-date-picker";

<PersianDatePicker
  format="YYYY/MM/DD"
  placeholder="انتخاب تاریخ"
  onChange={(date) => console.log(date)}
/>;

Range picker

import { PersianRangePicker } from "@zorvx/antd-persian-date-picker";

<PersianRangePicker
  placeholder={["تاریخ شروع", "تاریخ پایان"]}
  onChange={(dates) => console.log(dates)}
/>;

With time picker

<PersianDatePicker showTime format="YYYY/MM/DD HH:mm" />

Month / year picker

<PersianDatePicker picker="month" placeholder="انتخاب ماه" />
<PersianDatePicker picker="year" placeholder="انتخاب سال" />

Disable specific dates

<PersianDatePicker
  disabledDate={(current) => {
    // disable weekends (example)
    return current.getDay() === 5; // Friday in Jalali week config
  }}
/>

Inside Ant Design Form

import { Form } from "antd";
import PersianDatePicker from "@zorvx/antd-persian-date-picker";

<Form>
  <Form.Item name="birthDate" label="تاریخ تولد">
    <PersianDatePicker style={{ width: "100%" }} />
  </Form.Item>
</Form>;

Utility: format date string

import { formatDateMMDDYYYY } from "@zorvx/antd-persian-date-picker";

const formatted = formatDateMMDDYYYY(new Date());
// e.g. "2026-6-28"

Optional: isolated Jalali dayjs

Use this when you need Jalali date formatting outside the picker, without polluting your app's global dayjs config:

import { jalaliDayjs } from "@zorvx/antd-persian-date-picker/jalali-dayjs";

const today = jalaliDayjs().format("YYYY/MM/DD");
const parsed = jalaliDayjs("1403/01/15", "YYYY/MM/DD");

Requires dayjs and jalaliday to be installed in your project.


API

PersianDatePicker and PersianRangePicker accept the same props as Ant Design's DatePicker and RangePicker.

Common props:

| Prop | Type | Description | | -------------- | ---------------------------------------------------- | ------------------------------- | | value | Date \| null | Controlled value | | onChange | (date, dateString) => void | Change handler | | format | string | Display format (default Jalali) | | placeholder | string \| [string, string] | Input placeholder(s) | | disabled | boolean | Disable the input | | disabledDate | (date: Date) => boolean | Disable specific dates | | showTime | boolean \| object | Enable time selection | | picker | "date" \| "week" \| "month" \| "quarter" \| "year" | Picker mode |


Support this project

If this package saves you time or fits your project, a GitHub star is a small gesture that helps a lot — it makes the repo easier for others to find and encourages ongoing maintenance.

Star on GitHub

Found a bug or have an idea? Open an issue — feedback is always welcome.


License

MIT