# rn-persian-date-picker-react

> ![rn-persian-date-picker-react](images/1.png)

Latest version **1.1.0** (published 2023-07-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install rn-persian-date-picker-react
pnpm add rn-persian-date-picker-react
yarn add rn-persian-date-picker-react
bun add rn-persian-date-picker-react
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2023-07-13 |
| First published | 2023-07-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 166.9 KB |
| Known vulnerabilities | 0 (+35 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Reza Noori |
| Maintainers | rezanoori |
| Keywords | date, date-picker, persian, persian-date-picker, react, next js |

## Links

- npm: https://www.npmjs.com/package/rn-persian-date-picker-react
- Repository: https://github.com/Frontendexpress/RN-persian-date-picker
- Homepage: https://github.com/Frontendexpress/RN-persian-date-picker#readme
- Issues: https://github.com/Frontendexpress/RN-persian-date-picker/issues
- npm.io page: https://npm.io/package/rn-persian-date-picker-react

## Dependencies (11)

- [next](https://npm.io/package/next.md) 13.4.9
- [react](https://npm.io/package/react.md) 18.2.0
- [eslint](https://npm.io/package/eslint.md) 8.44.0
- [react-dom](https://npm.io/package/react-dom.md) 18.2.0
- [jalaali-js](https://npm.io/package/jalaali-js.md) ^1.2.6
- [typescript](https://npm.io/package/typescript.md) 5.1.6
- [@types/node](https://npm.io/package/@types/node.md) 20.4.1
- [react-icons](https://npm.io/package/react-icons.md) ^4.10.1
- [@types/react](https://npm.io/package/@types/react.md) 18.2.14
- [@types/react-dom](https://npm.io/package/@types/react-dom.md) 18.2.7
- [eslint-config-next](https://npm.io/package/eslint-config-next.md) 13.4.9

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2023-07-13
- 1.0.3 — 2023-07-13
- 1.0.2 — 2023-07-13
- 1.0.1 — 2023-07-13
- 1.0.0 — 2023-07-13

## README

![rn-persian-date-picker-react](images/1.png)

# rn-persian-date-picker-react

This is a package that includes two components: `DatePicker` and `RangeDatePicker`.

## Installation

To install this package, run the following command:

```javascript
npm install rn-persian-date-picker-react
``````

## get started

```javascript
import { DatePicker, RangeDatePicker } from 'rn-persian-date-picker-react';
``````
and import global.css in top of entry file :
```javascript
import 'rn-persian-date-picker-react/dist/global.css'
``````
## Props
### DatePicker :
The DatePicker component allows you to select a single date. It accepts the following props:

1-default_value: The default date value to be displayed. It should be an object with year, month, and day properties.

2-callback: A callback function that will be called when a date is selected. It will receive the selected date as an argument.
if cancel button press it will call with undefined argument
```javascript
<DatePicker
  default_value={{ year: 1402, month: 6, day: 5 }}
  callback={(selectedDate) => {
    console.log(selectedDate);
  }}
/>
``````


### RangeDatePicker :
The RangeDatePicker component allows you to select a range of dates. It accepts the following props:


1-start_default_value: The default start date value to be displayed. It should be an object with year, month, and day properties.



2-end_default_value: The default end date value to be displayed. It should be an object with year, month, and day properties.



3-A callback function that will be called when a range of dates is selected. It will receive an object with start and end properties representing the selected start and end dates.
if cancel button press it will call with undefined arguments

```javascript
<RangeDatePicker
  start_default_value={{ year: 1403, month: 3, day: 21 }}
  end_default_value={{ year: 1403, month: 5, day: 3 }}
  callback={(selectedRange) => {
    console.log(selectedRange.start, selectedRange.end);
  }}
/>
``````

---
_Source: https://npm.io/package/rn-persian-date-picker-react · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
