1.0.2 • Published 4 years ago

react-barebones-calendar v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

react-barebones-calendar

A simple fully customizable calendar for react.

react-barebones-calendar demo-gif

Getting Started

Installation

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:

Examples

View all the example code in src/examples/

The basic example is shown along with the code below:

react-barebones-calendar demo-png

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

The example code is available at src/examples/

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.12

7 years ago

0.1.11

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.17

7 years ago

0.0.16

7 years ago

0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago