# react-native-calendar-component-patch

> Calendar component for ReactNative.

Latest version **0.1.1** (published 2017-06-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-calendar-component-patch
pnpm add react-native-calendar-component-patch
yarn add react-native-calendar-component-patch
bun add react-native-calendar-component-patch
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2017-06-23 |
| First published | 2017-06-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ravi |
| Maintainers | ravi.14378 |
| Keywords | ReactNative, calendar |

## Links

- npm: https://www.npmjs.com/package/react-native-calendar-component-patch
- Repository: https://github.com/ravik2015/react-native-calendar-component-patch
- Homepage: https://github.com/ravik2015/react-native-calendar-component-patch.git#readme
- Issues: https://github.com/ravik2015/react-native-calendar-component-patch.git
- npm.io page: https://npm.io/package/react-native-calendar-component-patch

## Recent versions

- 0.1.1 (latest) — 2017-06-23

## README

# react-native-calendar
Calendar component for ReactNative. It is stateless component.

![example](calendar.png)

## install 
```
npm install --save react-native-calendar-component-patch
```

## props
|  prop              | type     | default value                |
|--------------------|----------|------------------------------|
| date               | Date     | new Date()                   |
| onDateSelect       | function | null                         |
| onPrevButtonPress  | function | null                         |
| onNextButtonPress  | function | null                         |
| dayNames           | array    | ["Sun", "Mon" ... ]          |
| monthNames         | array    | ["January", "February" ... ] |
| weekFirstDay       | number   | 0                            |

## usage

```javascript
import React, { Component } from "react";
import Calendar   from "react-native-calendar-component-patch";

export default class CalendarTest extends Component {
    constructor(props) {
        super(props);

        this.state = {
            date: new Date()
        };
    }

    handleNextButtonPress() {
        const date = new Date(this.state.date);
        date.setMonth(date.getMonth() + 1);
        this.setState({
            date
        });
    }

    handlePrevButtonPress() {
        const date = new Date(this.state.date);
        date.setMonth(date.getMonth() - 1);
        this.setState({
            date
        });
    }

    handleDateSelect(date) {
        alert(`clicked: ${this.state.date.toString()}`);
    }

    render() {
        return (
            <Calendar
                date={this.state.date}
                onPrevButtonPress={() => this.handlePrevButtonPress()}
                onNextButtonPress={() => this.handleNextButtonPress()}
                onDateSelect={(date) => this.handleDateSelect(date)} />
        );
    }
}
```

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