All Projects → ericz1803 → react-google-calendar

ericz1803 / react-google-calendar

Licence: MIT License
React Calendar Component that displays data from Google Calendar

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to react-google-calendar

Notion-GCal-Sync
A Python script to automate the syncing of tasks between Google Calendar and the all-in-one productivity workspace, Notion. It utilizes API and is customizable for your own needs. Free to use.
Stars: ✭ 120 (+87.5%)
Mutual labels:  google-calendar, google-calendar-api
Notion-and-Google-Calendar-2-Way-Sync
2 Way Sync Between Notion Database and Google Calendar
Stars: ✭ 205 (+220.31%)
Mutual labels:  google-calendar, google-calendar-api
garoon-google
To synchronize the Garoon schedule to Google Calendar.
Stars: ✭ 28 (-56.25%)
Mutual labels:  google-calendar
google-calendar-api
Demo Project for Google Calendar API Using Spring Boot Rest API with OAuth2
Stars: ✭ 25 (-60.94%)
Mutual labels:  google-calendar
react-meeting-room
A simple web app to book meeting rooms inside an office, built using React and Google Calendar API
Stars: ✭ 101 (+57.81%)
Mutual labels:  google-calendar-api
infocenter
Raspberry Pi weather, calendar, and internet radio with graphical, touch-based interface.
Stars: ✭ 18 (-71.87%)
Mutual labels:  google-calendar
node-google-calendar
Simple node module that supports Google Calendar API
Stars: ✭ 76 (+18.75%)
Mutual labels:  google-calendar
ical2gcal
sync ics(es) to google calendar
Stars: ✭ 13 (-79.69%)
Mutual labels:  google-calendar
garoogle
GaroonとGoogle Calendarの予定を同期します
Stars: ✭ 25 (-60.94%)
Mutual labels:  google-calendar
DesktopCalendar
Google Calendar을 연동하여 바탕화면에 달력과 시간 등 기타 데이터를 표시하는 프로그램입니다.
Stars: ✭ 18 (-71.87%)
Mutual labels:  google-calendar
google-calendar-slack-status
Automatically sync your Google Calendar events to your Slack status
Stars: ✭ 33 (-48.44%)
Mutual labels:  google-calendar
google-calendar-layer
A google calendar layer for Spacemacs
Stars: ✭ 39 (-39.06%)
Mutual labels:  google-calendar
Daylight-Calendar-ICS
Daylight Calendar is a dynamically generated .ics calendar that you can host and subscribe to in Google Calendar, iCal, or other calendar software.
Stars: ✭ 22 (-65.62%)
Mutual labels:  google-calendar
bhitte-patro
Google Calendar for Nepali Date
Stars: ✭ 25 (-60.94%)
Mutual labels:  google-calendar
ics2gcal
Import .ics files into Google Calendar with only two clicks.
Stars: ✭ 21 (-67.19%)
Mutual labels:  google-calendar
birthday
农历生日 for Google calendar
Stars: ✭ 60 (-6.25%)
Mutual labels:  google-calendar
TimeTableManager
Simple react application to create a TimeTable based only on your choice of subjects.
Stars: ✭ 30 (-53.12%)
Mutual labels:  google-calendar
prodcal ics
Производственный календарь в формате ics
Stars: ✭ 23 (-64.06%)
Mutual labels:  google-calendar
calendar-link
📅 Calendar link generator for popular services
Stars: ✭ 193 (+201.56%)
Mutual labels:  google-calendar
weather-calendar-feed
Display yr.no weather (supports the entire Earth) forecasts with highly customizable Event titles in your Google Calendar, Android phone, iPhone, Outlook or other iCalendar app
Stars: ✭ 16 (-75%)
Mutual labels:  google-calendar

React Google Calendar

npm (scoped) Build Status

A react component that displays an event calendar using data from google's calendar api. It is intended to replace the embedded google calendar.

It handles reccuring events, deleted events, and changed events. It also handles and displays events of all lengths in a very similar way to google calendar and supports multiple calendars. All events are displayed in the user's timezone.

See it in action here or try it yourself in CodeSandbox here.

picture of calendar

Design inspired by this calendar and Google Calendar. Icons from Material Design.

Installation

1. npm install --save react react-dom @emotion/react
2. npm install --save @ericz1803/react-google-calendar

Usage

First, get an api key from here by following step 1.

Alternately, you can go to https://console.developers.google.com/flows/enableapi?apiid=calendar.

Then, get the calendar id from the google calendar. It will look something like [email protected].
You can find it by going to a calendar's settings and scrolling down to the section that is labelled Integrate calendar.

Basic Example

import React from "react";
import Calendar from "@ericz1803/react-google-calendar";

const API_KEY = "YOUR_API_KEY";
let calendars = [
  {calendarId: "YOUR_CALENDAR_ID"},
  {
    calendarId: "YOUR_CALENDAR_ID_2",
    color: "#B241D1" //optional, specify color of calendar 2 events
  }
];

class Example extends React.Component {
  render() {
    return (
      <div>
        <Calendar apiKey={API_KEY} calendars={calendars} />
      </div>
    )
  }
}

Properties

Parameter Type Description
apiKey string google api key (required)
calendars array of objects google calendar id and display color (required)
styles object styles (optional, see more below)
showArrow boolean shows arrow for events that span multiple months (optional, defaults to true)
showFooter boolean whether or not to show footer (optional, defaults to true)
language string Available options : 'ES', 'PT', 'FR', 'SL' default: 'EN'

Customization

You can customize the color of each calendar's events by specifying a color field with the calendar id (see examples).

To customize other aspects of the calendar (eg. borders, colors of the calendar), pass in a styles object. Each of the styles in the styles object should be an object style (the same as react inline styles) or an emotion css string style (see more here). If you choose to use emotion's css string styles, make sure to import { css } from "@emotion/react".

Style Keys

  • calendar
  • day
  • today
  • tooltip
  • event
  • eventText
  • eventCircle
  • multiEvent

Example With Customization

import React from "react";
import Calendar from "@ericz1803/react-google-calendar";
import { css } from "@emotion/react";

const API_KEY = "YOUR_API_KEY";
let calendars = [
  {calendarId: "[email protected]", color: "#B241D1"}, //add a color field to specify the color of a calendar
  {calendarId: "[email protected]"}, //without a specified color, it defaults to blue (#4786ff)
  {calendarId: "[email protected]", color: "rgb(63, 191, 63)"} //accepts hex and rgb strings (doesn't work with color names)
];

let styles = {
  //you can use object styles (no import required)
  calendar: {
    borderWidth: "3px", //make outer edge of calendar thicker
  },
  
  //you can also use emotion's string styles
  today: css`
   /* highlight today by making the text red and giving it a red border */
    color: red;
    border: 1px solid red;
  `
}

const language = 'ES';

class Example extends React.Component {
  render() {
    return (
      <div>
        <Calendar 
        apiKey={API_KEY} 
        calendars={calendars} 
        styles={styles} 
        language={language}
        />
      </div>
    )
  }
}

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].