# hc-rdr

> React date

Latest version **2.0.3** (published 2018-02-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install hc-rdr
pnpm add hc-rdr
yarn add hc-rdr
bun add hc-rdr
```

## 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.3 |
| Published | 2018-02-06 |
| First published | 2018-01-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tudor Filipovici |
| Maintainers | hctudorfilipovici |
| Keywords | react, date, range, datepicker, rangepicker |

## Links

- npm: https://www.npmjs.com/package/hc-rdr
- Repository: https://github.com/filtudo/rdr
- Homepage: https://github.com/filtudo/rdr#readme
- Issues: https://github.com/filtudo/rdr/issues
- npm.io page: https://npm.io/package/hc-rdr

## Dependencies (6)

- [react](https://npm.io/package/react.md) ^16.2.0
- [moment](https://npm.io/package/moment.md) ^2.19.4
- [classnames](https://npm.io/package/classnames.md) ^2.2.1
- [prop-types](https://npm.io/package/prop-types.md) ^15.5.10
- [@types/react](https://npm.io/package/@types/react.md) *
- [@types/moment-timezone](https://npm.io/package/@types/moment-timezone.md) *

## 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.3 (latest) — 2018-02-06
- 2.0.2 — 2018-02-05
- 2.0.1 — 2018-02-05
- 2.0.0 — 2018-02-01
- 1.1.7 — 2018-02-01
- 1.1.6 — 2018-02-01
- 1.1.5 — 2018-02-01
- 1.1.3 — 2018-02-01
- 1.1.2 — 2018-01-31
- 1.1.1 — 2018-01-31
- 1.1.0 — 2018-01-31
- 1.0.8 — 2018-01-30
- 1.0.7 — 2018-01-30
- 1.0.6 — 2018-01-30
- 1.0.5 — 2018-01-29
- … 11 more at https://npm.io/package/hc-rdr/versions

## README

# react-date-range
![](https://badge.fury.io/js/react-date-range.svg)
![](https://david-dm.org/Adphorus/react-date-range.svg)
![](https://david-dm.org/Adphorus/react-date-range/dev-status.svg)

A React component for choosing dates and date ranges. Uses [Moment.js](http://momentjs.com/) for date operations.

**Live Demo :** [http://adphorus.github.io/react-date-range](http://adphorus.github.io/react-date-range)

![](https://cdn.pbrd.co/images/1fjQlZzy.png)

## Getting Started
### Installation

```
$ npm install --save react-date-range
```

## Usage
### Date Picker
```javascript
import React, { Component } from 'react';
import { Calendar } from 'react-date-range';

class MyComponent extends Component {
	handleSelect(date){
		console.log(date); // Momentjs object
	}

	render(){
		return (
			<div>
				<Calendar
					onInit={this.handleSelect}
					onChange={this.handleSelect}
				/>
			</div>
		)
	}
}

```

###### Available Options (props)
* **date:** *(String, Moment.js object, Function)* - default: today
* **format:** *(String)* - default: DD/MM/YYY
* **firstDayOfWeek** *(Number)* - default: [moment.localeData().firstDayOfWeek()](http://momentjs.com/docs/#/i18n/locale-data/)
* **theme:** *(Object)* see [Demo's source](https://github.com/Adphorus/react-date-range/blob/master/demo/src/components/Main.js#L130)
* **onInit:** *(Function)* default: none
* **onChange:** *(Function)* default: none
* **minDate:** *(String, Moment.js object, Function)* default: none
* **maxDate:** *(String, Moment.js object, Function)* default: none
* **lang:** *(String, 'cn' - Chinese, 'jp' - Japanese, 'fr' - French, 'it' - Italian, 'de' - German, 'es' - Spanish, 'ru' - Russian, 'tr' - Turkish, 'pt'  - Portuguese, 'fi' - Finnish)* default: none

### Range Picker
```javascript
import React, { Component } from 'react';
import { DateRange } from 'react-date-range';

class MyComponent extends Component {
	handleSelect(range){
		console.log(range);
		// An object with two keys,
		// 'startDate' and 'endDate' which are Momentjs objects.
	}

	render(){
		return (
			<div>
				<DateRange
					onInit={this.handleSelect}
					onChange={this.handleSelect}
				/>
			</div>
		)
	}
}

```

## TODO
remove react dependency
add typescript

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