Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mr-jalali-react-datepicker

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mr-jalali-react-datepicker

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.

  • 1.2.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

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

propstypedefault
valuetimestamp | Date | MomentDate
weekendnumber[][6]
ArrowLeftReact.ReactTypedefault component
ArrowLeftReact.ReactTypedefault component
ClockIconReact.ReactTypedefault component
DateIconReact.ReactTypedefault component
timePickerbooleantrue.
onClickSubmitButtonfunctionnull. if you passed this will be something like
modalZIndexnumber9999
themeobjectdefault theme you can see here
labelstringdefault is null
openbooleandefault is false. control opening and close modal from outside
onTogglefunctiondefault 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.

propstypedefault
startstring. ex: 1397/5/18today date
endstring. ex: 1397/5/18today date
weekendnumber[][6]
ArrowLeftReact.ReactTypedefault component
ArrowRightReact.ReactTypedefault component
isRenderingButtonsbooleantrue. if it is false rangeDatePicker doesnt show submit and cancel buttons
onClickSubmitButtonfunctionnull. if you passed this will be something like this
modalZIndexnumber9999
themeobjectdefault theme you can see here
fromLabelstringdefault is از تاریخ
toLabelstringdefault is تا تاریخ
openbooleandefault is false. control opening and close modal from outside
onTogglefunctiondefault 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
Reza Khosroshahi

💻 📖 💡 🤔 ⚠️
saeedjalali
saeedjalali

💬 🐛 💻 🤔 👀 📢
ZMashhadizadeh
ZMashhadizadeh

💻 📦

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

License

MIT License

Keywords

FAQs

Package last updated on 07 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc