Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
mr-jalali-react-datepicker
Advanced tools
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.
🚨 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 😊
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.
$ npm install -S jalali-react-datepicker
props | type | default |
---|---|---|
value | timestamp | Date | Moment | 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 |
import React from "react";
import { render } from "react-dom";
import { DatePicker } from "jalali-react-datepicker";
render(<DatePicker />, document.getElementById("root"));
You can access to datePicker value when submit button is clicked.
example:
function submitExample({ value }) {
console.log("value ", value);
}
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 |
import React from "react";
import { render } from "react-dom";
import { RangeDatePicker } from "jalali-react-datepicker";
render(<RangeDatePicker />, document.getElementById("root"));
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);
}
Thanks goes to these wonderful people (emoji key):
Reza Khosroshahi 💻 📖 💡 🤔 ⚠️ | saeedjalali 💬 🐛 💻 🤔 👀 📢 | ZMashhadizadeh 💻 📦 |
---|
This project follows the all-contributors specification. Contributions of any kind welcome!
FAQs
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.
The npm package mr-jalali-react-datepicker receives a total of 4 weekly downloads. As such, mr-jalali-react-datepicker popularity was classified as not popular.
We found that mr-jalali-react-datepicker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.