# react-barebones-calendar

> A simple fully customizable calendar for react.

Latest version **1.0.2** (published 2021-03-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-barebones-calendar
pnpm add react-barebones-calendar
yarn add react-barebones-calendar
bun add react-barebones-calendar
```

## 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 | 1.0.2 |
| Published | 2021-03-19 |
| First published | 2017-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 174.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | George Vaughan |
| Maintainers | georgevaughan |
| Keywords | react-component, react, calendar, custom |

## Links

- npm: https://www.npmjs.com/package/react-barebones-calendar
- Repository: https://github.com/GeorgeVaughan/react-barebones-calendar
- Homepage: https://GeorgeVaughan.github.io/react-barebones-calendar
- Issues: https://github.com/GeorgeVaughan/react-barebones-calendar/issues
- npm.io page: https://npm.io/package/react-barebones-calendar

## Dependencies (9)

- [react](https://npm.io/package/react.md) ^16.1.1
- [moment](https://npm.io/package/moment.md) ^2.19.2
- [react-dom](https://npm.io/package/react-dom.md) ^16.1.1
- [@types/jest](https://npm.io/package/@types/jest.md) ^26.0.21
- [@types/node](https://npm.io/package/@types/node.md) ^14.14.35
- [@types/react](https://npm.io/package/@types/react.md) ^17.0.3
- [@types/moment](https://npm.io/package/@types/moment.md) ^2.13.0
- [react-scripts](https://npm.io/package/react-scripts.md) 4.0.3
- [@types/react-dom](https://npm.io/package/@types/react-dom.md) ^17.0.2

## 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.0.2 (latest) — 2021-03-19
- 1.0.1 — 2021-03-18
- 1.0.0 — 2021-03-18
- 0.1.12 — 2018-02-19
- 0.1.11 — 2018-02-19
- 0.1.10 — 2018-02-19
- 0.1.9 — 2018-02-18
- 0.1.8 — 2018-02-11
- 0.1.7 — 2018-02-11
- 0.1.6 — 2018-01-29
- 0.1.5 — 2018-01-22
- 0.1.4 — 2018-01-21
- 0.1.3 — 2018-01-21
- 0.1.2 — 2018-01-20
- 0.1.1 — 2018-01-20
- … 19 more at https://npm.io/package/react-barebones-calendar/versions

## README

# react-barebones-calendar

A simple fully customizable calendar for react.

![react-barebones-calendar demo-gif](https://raw.githubusercontent.com/GeorgeVaughan/react-barebones-calendar/master/demo.gif)

## Getting Started

### Installation

```sh
npm install --save react-barebones-calendar moment
```

### Run Demo

To view the demos on a web page go to https://GeorgeVaughan.github.io/react-barebones-calendar

To run the demo on your computer:

- Clone the react-barebones-calendar repository from https://github.com/GeorgeVaughan/react-barebones-calendar
- `npm install`
- `npm start`
- Visit http://localhost:3000/ on your browser

## Examples

View all the example code in [src/examples/](https://github.com/GeorgeVaughan/react-barebones-calendar/tree/master/src/examples)

The basic example is shown along with the code below:

![react-barebones-calendar demo-png](https://raw.githubusercontent.com/GeorgeVaughan/react-barebones-calendar/master/demo.png)

```js
class BasicCalendar extends Component<any, any> {
  constructor(props) {
    super(props);

    this.state = {
      monthMoments: getMonthsFrom(moment(), 1),
      selectedDay: moment()
    };
  }
  render() {
    const { monthMoments, selectedDay } = this.state;
    return (
      <Calendar
        monthGridProps={{
          monthMoments
        }}
        dayProps={{
          modifiers: [
            selectedModifier(selectedDay),
            emptyModifier,
            weekendModifier
          ],
          onClick: (_, { dayMoment }) =>
            this.setState({ selectedDay: dayMoment })
        }}
      />
    );
  }
}
```

There are also more complex examples like the large calendar displayed below:

![react-barebones-calendar large-demo-png](https://raw.githubusercontent.com/GeorgeVaughan/react-barebones-calendar/master/large-demo.png)

The example code is available at [src/examples/](https://github.com/GeorgeVaughan/react-barebones-calendar/tree/master/src/examples)

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