Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/abublihi/hijri-date-picker

A simple and reusble react component for hijir date pickre.
https://github.com/abublihi/hijri-date-picker

Last synced: 18 days ago
JSON representation

A simple and reusble react component for hijir date pickre.

Lists

README

        

# React Hijri DatePicker
A simple and reusble react component for hijir date pickre.

# If you want a `standalone` web component take a look at [datepicker hijri](https://github.com/abublihi/datepicker-hijri)

# Installation
The package can be installed using npm, this package requires you to install *moment-hijri*, *react-popper*, *react-onclickoutside* and *styled_components*
```
npm i hijri-date-picker
```
Or with script tag
```html

```
# Usage
### Example 1: npm installation
```javascript
import React from 'react';
import ReactDOM from 'react-dom';
import HijriDatePicker from 'hijri-date-picker';

ReactDOM.render(, document.getElementById('root'));

```
### Example 2: script tag
```html




React Hijri DatePicker




```

![without quick](https://image.ibb.co/nmvSAA/hijri-date-picker-no-Quick-Select.png "without quick")

### The `prop` quickSelect
this adds a quick select for year and month only add to the props `quickSelect`

```Html

```

for the tag example will be `quick-select="true"`
```Html

```

![without quick](https://image.ibb.co/m9tEqA/hijri-date-picker-with-Quick-Select.png "with quick")

### Date Format 'Default is `iYYYY/iMM/iDD`'
we are using moment and exactly moment hijri so any format for [moment-hijri](https://github.com/xsoh/moment-hijri) package will work fine, so any format must have the letter `i` before it e.g. (`YYYY-MM-DD` -> `iYYYY-iMM-iDD`).

Thank You @xsoh for the awesome package *moment-hijri*