Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
react-persian-datepicker2
Advanced tools
Persian calendar and date picker components for React. This is an open source project made in @evandhq team.
React Persian Date Picker مجموعهای از کامپوننتهای ReactJS مورد نیاز جهت ایجاد ورود و نمایش تاریخ هجری شمسی است. این نرمافزار متنباز در ایوند توسعه یافتهاست.
Use npm to install the package:
npm install react-persian-datepicker --save
This package offers two components, Calendar
and DatePicker
. The first of which is a simple calendar that you can use in whichever way you want. The second one is an actual input with an input-ish behaviour.
This package uses moment-jalaali under the hood and all the values are basically moment objects.
Below is a basic example.
import React from 'react';
import { Calendar, DatePicker } from 'react-persian-datepicker';
const MyComponent = () => (
<div>
<div>
{/* Calendar Component */}
<Calendar />
</div>
<div>
{/* Date Picker Component */}
<DatePicker />
</div>
</div>
);
Current API documentation for v3.0.2 is available and for more examples take a look at here.
Note that you need css-loader
for /\.css$/
files enabled to have the styles working as we use css modules to put classnames in place. Otherwise, you'll have to pass an object of class names (like a css module) as styles
prop. This way, you can develop your own stylesheet for the calendar according to the basic one. The only thing that you will need to do is to require the css file that you made and pass it as styles
prop to either Calendar
or DatePicker
.
FAQs
Persian calendar and date picker components for React
The npm package react-persian-datepicker2 receives a total of 2 weekly downloads. As such, react-persian-datepicker2 popularity was classified as not popular.
We found that react-persian-datepicker2 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.