# awesome-react-datepicker

> React datepicker component.

Latest version **2.0.1** (published 2019-01-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install awesome-react-datepicker
pnpm add awesome-react-datepicker
yarn add awesome-react-datepicker
bun add awesome-react-datepicker
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2019-01-16 |
| First published | 2019-01-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 36.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ritwik Saha |
| Maintainers | ritwik310 |
| Keywords | react, datepicker, customizable, react datepicker, date, react-component |

## Links

- npm: https://www.npmjs.com/package/awesome-react-datepicker
- Repository: git@github.com:ritwik310/awesome-react-datepicker
- npm.io page: https://npm.io/package/awesome-react-datepicker

## Dependencies (4)

- [react](https://npm.io/package/react.md) 16.7.0
- [react-dom](https://npm.io/package/react-dom.md) 16.7.0
- [react-icons](https://npm.io/package/react-icons.md) 3.2.2
- [react-dropdown-modal](https://npm.io/package/react-dropdown-modal.md) 1.2.3

## 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

- 2.0.1 (latest) — 2019-01-16
- 2.0.0 — 2019-01-13
- 1.1.1 — 2019-01-12
- 1.1.0 — 2019-01-11
- 1.0.2 — 2019-01-07
- 1.0.1 — 2019-01-06
- 1.0.0 — 2019-01-06

## README

# React Datepicker Component

[![Build Status](https://travis-ci.com/ritwik310/awesome-react-datepicker.svg?branch=master)](https://travis-ci.com/ritwik310/awesome-react-datepicker)
![](https://img.shields.io/github/license/ritwik310/awesome-react-datepicker.svg)   
An elegant customizable react datepicker component.

## Installation
```shell
yarn add awesome-react-datepicker
```

## Example
A sample example here..
```javascript
import React, { Component } from 'react';
import Datepicker from 'awesome-react-datepicker';

class App extends Component {
  constructor(props) {
    super(props);
    this.state = {
      date: new Date()
    };
  }

  render() {
    return (
      <div className='App'>
        <Datepicker
          initDate={this.state.date}
          onDateSelect={(timeStamp) => {
            this.setState({ date: new Date(timeStamp) });
          }}
        />          
      </div>
    );
  }
}

export default App;
```

## Customizations

### Custom children
To rendar custom children elements inside the input...
```javascript
<Datepicker
  initDate={this.state.date}
  onDateSelect={(timeStamp) => {
    this.setState({ date: new Date(timeStamp) });
  }}
>
  <h3>{this.state.date.getDate()}</h3>
</Datepicker>
```

### Custom Props
Property|Type|Default|Description|Required
---|---|---|---|---
uniqueId|String|undefined|HTML id attribute, unique for each Datepicker component|true
onDateSelect|Function|undefined|To handle date selection|true
textColor|String|#606060|Color code for html elements|false
borderColor|String|#bbbbbb|Color code for Input and Calendar borders|false
themeColor|String|#ffcb05|themeColor|false
hoverBackground|String|#e5e5e5|Background color on date & nav-button hover|false
backgroundColor|String|#ffffff|Datepicker background color|false
customZIndex|Number|20|Z-index of modal|false

Thank you & Good luck..

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