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

mr-jalali-react-datepicker

v1.2.5

Published

React component that helps you to makes simple Farsi/Jalali/Shamsi date picker. It also has range date picker you can select multiple days in multiple months.

Downloads

30

Readme

Jalali React Date-Picker

Build Status All Contributors

🚨 I start to redesigning this package. Here you can see the new artboards that well designed by eanlami. If you want to collabrate for this version feel free to make changes or contact me 😊

alt-text

React component that helps you to makes simple Farsi/Jalali/Shamsi date picker. It also has range date picker you can select multiple days in multiple months.

Installation

$ npm install -S jalali-react-datepicker

Date Picker

| props | type | default | | ------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------- | | value | timestamp | Date | Moment | Date | Moment | today date | | weekend | number[] | [6] | | ArrowLeft | React.ReactType | default component | | ArrowLeft | React.ReactType | default component | | ClockIcon | React.ReactType | default component | | DateIcon | React.ReactType | default component | | timePicker | boolean | true. | | onClickSubmitButton | function | null. if you passed this will be something like | | modalZIndex | number | 9999 | | theme | object | default theme you can see here | | label | string | default is null | | open | boolean | default is false. control opening and close modal from outside | | onToggle | function | default is undefined. this function will be called when the modal open and close state is changed |

usage

import React from "react";
import { render } from "react-dom";
import { DatePicker } from "jalali-react-datepicker";

render(<DatePicker />, document.getElementById("root"));

onClickSubmitButton

You can access to datePicker value when submit button is clicked.

example:

function submitExample({ value }) {
  console.log("value ", value);
}

Range Date Picker

You can make range date picker with this component. In the below table you can see all the props you can pass to this component.

Note that all props are optional.

| props | type | default | | ------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | start | string. ex: 1397/5/18 | today date | | end | string. ex: 1397/5/18 | today date | | weekend | number[] | [6] | | ArrowLeft | React.ReactType | default component | | ArrowRight | React.ReactType | default component | | isRenderingButtons | boolean | true. if it is false rangeDatePicker doesnt show submit and cancel buttons | | onClickSubmitButton | function | null. if you passed this will be something like this | | modalZIndex | number | 9999 | | theme | object | default theme you can see here | | fromLabel | string | default is از تاریخ | | toLabel | string | default is تا تاریخ | | open | boolean | default is false. control opening and close modal from outside | | onToggle | function | default is undefined. this function will be called when the modal open and close state is changed |

usage

import React from "react";
import { render } from "react-dom";
import { RangeDatePicker } from "jalali-react-datepicker";

render(<RangeDatePicker />, document.getElementById("root"));

onClickSubmitButton

You can access to start and end date when submit button is clicked.

example:

function submitExample({ start, end }) {
  console.log("start ", start);
  console.log("end ", end);
}

ToDo

  • ~~write DatePicker~~
  • ~~add label to inputs~~
  • create codesandbox page for preview
  • ~~add TimePicker~~

Contributors

Thanks goes to these wonderful people (emoji key):

| Reza Khosroshahi💻 📖 💡 🤔 ⚠️ | saeedjalali💬 🐛 💻 🤔 👀 📢 | ZMashhadizadeh💻 📦 | | :---: | :---: | :---: |

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT License