1.0.2 • Published 3 years ago

react-barebones-calendar v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
3 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

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago