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

@moamfar/react-time-date-picker

v1.2.4

Published

A React component library providing elegant and intuitive iOS-style pickers for Gregorian dates times and Jalaali (Persian) dates and Hijri dates offering a consistent user experience in your React applications.

Readme

React Time & Date Picker

A React component library providing elegant and intuitive iOS-style pickers for Gregorian, Jalaali (Persian), and Hijri dates, as well as time picking, offering a smooth and consistent user experience for React applications.

React TailwindCSS npm JavaScript TypeScript


🧐 Features

  • Time Picker (12-hour or 24-hour format)
  • Date Picker (Gregorian)
  • Jalaali (Persian) Date Picker
  • Hijri Date Picker
  • Auto-submit on scroll or manual submit
  • Fully customizable via TailwindCSS classes
  • Lightweight and responsive

🛠 Installation

  1. Install the package via npm:
npm install @moamfar/react-time-date-picker
  1. Import the styles in your project:
import "@moamfar/react-time-date-picker/dist/style.css";
  1. Import the components in your React code:
import { DatePicker, TimePicker, CustomPicker } from "@moamfar/react-time-date-picker";

📸 Screenshots

Date Picker (Gregorian) Date Picker

Time Picker Time Picker

Jalaali Date Picker Date Picker Jalaali

Hijri Date Picker Date Picker Hijri


🔴 Props

TimePicker Props

| Prop | Description | Required | Default Value | | ---------------------- | --------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------ | | selectedTime | Value of returned time object | Yes | undefined | | setSelectedTime | Function to set the returned time object | Yes | undefined | | is24Hours | Whether to use 24-hour format | No | false | | utcOffset | UTC offset (number or string) | No | 210 | | submitCallback | Function called after clicking submit button | No | undefined | | submitTitle | Title of the submit button | No | "Submit" | | buttonClassName | Tailwind classes for the button | No | "w-full bg-black rounded-md flex items-center justify-center h-10" | | submitTitleClassName | Tailwind classes for button text | No | "text-white" | | containerClassName | Tailwind classes for the container | No | "flex px-[10%] md:px-[25%] flex-row items-center justify-center w-full h-[18rem] overflow-hidden relative" | | autoSubmitDebounce | Debounce time in ms for auto-submit on scroll | No | 300 |


DatePicker Props

| Prop | Description | Required | Default Value | | ---------------------- | ----------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------ | | selectedDate | Value of returned date object | Yes | undefined | | setSelectedDate | Function to set the returned date object | Yes | undefined | | type | Calendar type: georgian, jalaali, hijri | No | georgian | | maxYear | Maximum selectable year | No | Current year | | minYear | Minimum selectable year | No | 100 years back | | maxDate | Maximum date allowed (timestamp) | No | undefined | | minDate | Minimum date allowed (timestamp) | No | undefined | | maxDateError | Error string when date exceeds maxDate | No | undefined | | minDateError | Error string when date is before minDate | No | undefined | | submitCallback | Function called after clicking submit button | No | undefined | | submitTitle | Title of the submit button | No | "Submit" | | buttonClassName | Tailwind classes for the button | No | "w-full bg-black rounded-md flex items-center justify-center h-10" | | submitTitleClassName | Tailwind classes for button text | No | "text-white" | | containerClassName | Tailwind classes for the container | No | "flex px-[10%] md:px-[25%] flex-row items-center justify-center w-full h-[18rem] overflow-hidden relative" | | columnsOrder | Order of columns (day, month, year) | No | ["day","month","year"] | | sonnerOptions | Options for toast notifications (min/max date errors) | No | undefined | | autoSubmitDebounce | Debounce time in ms for auto-submit on scroll | No | 300 |


CustomPicker Props

| Prop | Description | Required | Default Value | | ---------------------- | --------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------ | | value | Selected value | No | undefined | | setValue | Function to set selected value | Yes | undefined | | slides | Array of slide objects {id, title} | Yes | undefined | | loading | Show loading state on submit button | No | false | | submitCallback | Function called after clicking submit button | No | undefined | | submitTitle | Title of the submit button | No | "ثبت" | | buttonClassName | Tailwind classes for the button | No | "w-full bg-black rounded-md flex items-center justify-center h-10" | | submitTitleClassName | Tailwind classes for button text | No | "text-white" | | containerClassName | Tailwind classes for the container | No | "flex px-[10%] md:px-[25%] flex-row items-center justify-center w-full h-[18rem] overflow-hidden relative" | | useTransform | Use 3D transform effect on wheel | No | true | | autoSubmitDebounce | Debounce time in ms for auto-submit on scroll | No | 300 |


💻 Built With

  • React
  • TailwindCSS
  • Embla Carousel
  • moment
  • moment-jalaali
  • moment-hijri
  • Lodash
  • sonner (toast notifications)

📖 Usage Examples

TimePicker Example:

<TimePicker
  selectedTime={{ hour: "12", minute: "30", meridiem: "PM" }}
  setSelectedTime={(time) => console.log(time)}
  is24Hours={false}
/>

DatePicker Example:

<DatePicker
  selectedDate={{ day: 5, month: 8, year: 2025 }}
  setSelectedDate={(date) => console.log(date)}
  type="jalaali"
/>

CustomPicker Example:

<CustomPicker
  value={{ id: 2, title: "Option 2" }}
  setValue={(val) => console.log(val)}
  slides={[
    { id: 1, title: "Option 1" },
    { id: 2, title: "Option 2" },
    { id: 3, title: "Option 3" },
  ]}
/>

🔗 License

MIT License