Giter Club home page Giter Club logo

react-calendar-from-scratch's Introduction

REACT EVENT CALENDAR FROM SCRATCH

This package has been deprecated, use https://www.npmjs.com/package/react-full-event-calendar instead

An event calendar like the google's calendar with generic style.

Installation

npm i react-full-event-calendar

or

yarn add react-full-event-calendar

Day Calendar

Screen Shot 2020-01-30 at 13 57 35

Week Calendar

Screen Shot 2020-01-30 at 13 57 56

Month Calendar

Screen Shot 2020-01-30 at 13 58 06

Usage

const Calendar = require('react-full-event-calendar');

const titleText = 'working in the weekend';

const events = [
  {
    startTime: new Date(moment().add(2, 'hour')),
    endTime: new Date(moment().add(3, 'hour')),
    title: 'working in the weekend',
  },
  {
    startTime: new Date(moment().add(-3, 'hour')),
    endTime: new Date(moment().add(-2, 'hour')),
    title: 'working in the weekend',
  },
  {
    startTime: new Date(),
    endTime: new Date(moment().add(1, 'hour')),
    title: 'working in the weekend',
  },
];

<Calendar
  events={events}
/>

Props

Property Type Default Description
events Array Required Events to display on the calendar
dayOrientation String horizontal The orientation of the day calendar, either 'vertical' or 'horizontal'
defautlCalendarView String week The default calendar to show, either 'day', 'week' or 'month'
defaultDate Date new Date() The date to start on when mounted
onDayChange func(day, newDay) Callback when the day change on day calendar
onWeekChange func(newStartOfTheWeek, newEendOfTheWeek) Callback when the week change on week calendar
onMonthChange func(newMonth, newYear) Callback when the month change on month calendar

Event Objects

Key Type Required Description
title String true The title of the event
startTime Date true The start time of the event
endTime Date true The end time of the event

DEMO

Demo

Authors

See also the list of contributors who participated in this project.

react-calendar-from-scratch's People

Contributors

karlmusingo avatar emyrukundo avatar

Stargazers

Espoir Murhabazi avatar Oluwasegun Adepoju avatar

Watchers

James Cloos avatar  avatar

react-calendar-from-scratch's Issues

How to configure the package with webpack

I would like to plot all my trips requests dates on the calendar. I want to use your package. However, webpack failed to bundle it.

   ERROR in ./src/views/trips/ViewCalendar.js
   Module not found: Error: Can't resolve 'react-full-event-calendar' in 
   '/Users/niyo/Documents/Andela/project/team-odd-bn-frontend/src/views/trips'
   @ ./src/views/trips/ViewCalendar.js 10:15-51
   @ ./src/App.js
   @ ./src/index.js

More Info, I have installed my react project from scratch.
Any help or support is highly appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.