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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@skhazaei/persian-date-picker

v0.1.0

Published

Persian Date Picker is a lightweight and user-friendly date picker component for React, specifically designed to support the Persian calendar. It offers a seamless two-way conversion between Jalaali and Gregorian dates, making it ideal for developers look

Downloads

144

Readme

Persian Date Picker

Persian Date Picker is a lightweight and user-friendly date picker component for React, specifically designed to support the Persian calendar. It offers a seamless two-way conversion between Jalaali and Gregorian dates, making it ideal for developers looking to incorporate the Persian calendar into their React projects. With this package, users can easily choose a date or time period, while also having access to a wide range of standard time formats based on Gregorian dates, including UTC and more. Overall, the Persian Date Picker is a highly versatile and reliable option for anyone looking to integrate a Persian calendar into their React application.


Installation

To install persian-date-picker, you will need to have npm or yarn installed on your system. Once you have one of these package managers set up, you can install persian-date-picker by running the following command:

npm i @skhazaei/persian-date-picker

or

yarn add @skhazaei/persian-date-picker

This will install the latest version of jalaali-react-date-picker and add it as a dependency to your project.


Usage

Calendar type

import PersianDatePicker from '@skhazaei/persian-date-picker'

function App() {
  return <PersianDatePicker input={false} />
}

Gregorian Calendar

to use it, you have to pass isGregorian={true} to the component:

import PersianDatePicker from '@skhazaei/persian-date-picker'

function App() {
  return <PersianDatePicker input={false} isGregorian={true} />
}

Options

| Property | Type | Description | | --------------| -------------------------------------------------------- | --------------------------------------------------------------------------------------- | | input | boolean | by defalut, calendar has an input to show its value. if you want only use calendar without input you have to pass false value | | isGregorian | boolean | by defalut, this value is false. | | selectedDay | Date | null | - | | onSelectDay | Date | - | | minDate | Date | null | if you want to disable days before a special day, you need to pass your date as property to the component. | | maxDate | Date | null | if you want to disable days a after special day, you need to pass your date as property to the component. | | isRange | boolean | When you want use calendar as range picker, you have to add isRange={true} as a property to the component. it need also  | | rangeDays | [Date | null , Date | null] | It accept an array of two values. the first as first date and the last one as last date. | | onSelectRange | [Date,Date] | It will return an array of selected range of dates. | | selectedBackgroundColor | hex | - | | selectedTextColor | hex | - | | rangeBackgroundColor | hex | - |