React Native Calendar component, fully implemented using @shopify/flash-list, react-native-gesture-handler and react-native-reanimated

Overview

📅 React Native Calendar Kit

React Native Calendar component, fully implemented using @shopify/flash-list, react-native-gesture-handler and react-native-reanimated. Support pinch to zoom, drag and drop to create/update event.

Version

RPReplay_Final1667537767.MP4

Installation

Using Yarn:

$ yarn add @howljs/calendar-kit

Using NPM:

$ npm install --save @howljs/calendar-kit

Installing dependencies into a bare React Native project

Using Yarn:

$ yarn add @shopify/flash-list react-native-gesture-handler react-native-reanimated

Using NPM:

$ npm install --save @shopify/flash-list react-native-gesture-handler react-native-reanimated

Follow installation instructions for React Native Reanimated and React Native Gesture Handler.

Documentation

Features

Basic Usage

; // Day View ; // 3-days ; // Work week ;">
import { TimelineCalendar } from '@howljs/calendar-kit';

// Week View
<TimelineCalendar viewMode="week" />;

// Day View
<TimelineCalendar viewMode="day" />;

// 3-days
<TimelineCalendar viewMode="threeDays" />;

// Work week
<TimelineCalendar viewMode="workWeek" />;

View mode

Comments
  • Per-week unavailability support

    Per-week unavailability support

    Hi,

    Thanks for making this great library available! We're actively migrating to it in our new app. There is one missing feature though that we'd need to make full use of it.

    We require being able to set availability on a day-by-day basis. In other words, we don't have repeated availability by default, so we cannot use the current unavailability, which assumes it's the same info for each week. Note that we actually use availability, which we then convert to unavailable hours using xspans, which is totally fine. No need to change that.

    It would therefore be great if the "unavailable hours" could support dates as an index as opposed to just day numbers. Would this be something that you'd like to add? I'm a bit short on time, otherwise I'd look into it myself.

    opened by bartvanandel 7
  • feat: allow for setting minimum event height

    feat: allow for setting minimum event height

    When you have a very short event, like 5 or 15 minutes the element is so small you can't see it, and sometimes, interact with it.

    This PR introduces a minimum height theme property to make sure the EventBlock is always at least X high.

    opened by callaars 4
  • Custom

    Custom "now" time

    First of all thank you for making this excellent library.

    I would like to propose this small addition to the code where the NowIndicator uses a custom "now" time. The use case for us at Sunsama is that the user can have a different timezone set than the timezone used by the device. Having the ability to change the "now" time will make it able for us to show the time indicator in the "now" the user expects to see.

    I am hoping this is something you can use, if not feel free to close this PR and we will just keep using this internally.

    opened by callaars 4
  • feature request: support part time of day when crossing days

    feature request: support part time of day when crossing days

    Sometimes we need the event across several days but are only available part-time during each day. For example:

     {
        id: '1',
        title: 'presale',
        startDay: '2022-12-22',
        endDay: '2022-12-25',
        startTime: '09:00:00',
        endTime: '12:00:00'
      },
    

    then the event draws as: image

    opened by sapjax 2
  • Custom drag hour format

    Custom drag hour format

    Do with this what you will but if you are creating/editing an event and have a specifically short time label then the time indicator label when dragging displays not really useful information. In the case below dragging the box would just display the full hour.

    Since dragging is a more fine-grained control I needed a separate hour formatting for that.

    Screenshot 2022-12-05 at 20 17 57

    opened by callaars 2
  • Is it possible to implement a custom 'now' button inside the 'day header'?

    Is it possible to implement a custom 'now' button inside the 'day header'?

    We are actively integration this component inside our app, but we need to have a simple button to quickly go to the current date. I can't use the header of the screen itself but we have room in the day header because we always show one day at a time. Is there any was to implement a custom component (right or left)?

    opened by fkranenburg 2
  • Hours on drag doesnt work correctly

    Hours on drag doesnt work correctly

    When I've set the start and end hoour and then started dragging for creating new event the hour highlighted on left side by blue color, doesnt show proper time, still using old start-end

    https://user-images.githubusercontent.com/98807756/206170666-fe76bca6-def6-4a84-9b6f-5b4937cc7da6.MP4

    range from 0 to 24

    opened by KacperGora 1
  • How to get the dates of header when the mode changes?

    How to get the dates of header when the mode changes?

    OnChange function doesn’t return dates properly after changing the mode. At first some random dates are returned then after correct dates are returned.

    opened by SwikarBhattarai 1
  • Theme `editIndicatorColor` not used

    Theme `editIndicatorColor` not used

    I'm going to assume that editIndicatorColor is used for this specific view, so I've added it in there since currently you cannot change the drag-indicator colour and also the property isn't used.

    opened by callaars 1
  • Fabric Support ?

    Fabric Support ?

    Hello currently on fabric project seems to giving errors due to @shopify/flash-list is not compatible with fabric right now https://github.com/Shopify/flash-list/issues/196 Just a heads up otherwise great work keep it up Screen Shot 2022-11-08 at 13 23 24

    opened by KubilayKerim 1
  • Property `renderEventContent` not used in `DragEditItem` component

    Property `renderEventContent` not used in `DragEditItem` component

    Currently the renderEventContent is declared in the DragEditItem but never passed into, so in effect it never works. This patch passes that property in properly.

    opened by callaars 0
  • changing from week to day viewmode with onpress takes me to wrong day

    changing from week to day viewmode with onpress takes me to wrong day

    Hello, as the title says, i assigned an onpress to a FAB, to change the calendar view from "week" to "day".

    However, when i press the fab to access the day viewmode, it takes me to the previous day.

    apparently this happens only when changing to viewmode="day" with the onpress, initializining the calendar with viewmode="day" or "week", displays the correct dates.

    here's the code for reference: ` const actions = [ { text: "Oggi", icon: require("../../../assets/Week-icon.png"), name: "day", position: 1 }, { text: "Settimana", icon: require("../../../assets/Today-icon.png"), name: "week", position: 2 }, ];

    const Calendar = () => {

    const [isView, setIsView] = useState<CalendarViewMode>('week'); 
    console.log('isView start', isView);
    
    
    const onPressButton = (name: String) => {
        if(name === "week") setIsView("week");
        if(name === "day") setIsView("day"); 
    
        console.log('isView onPress', isView);
    }
    
    return ( 
        <> 
            <TimelineCalendar 
            locale='it'
            allowPinchToZoom
            initialTimeIntervalHeight={60}
            minTimeIntervalHeight={29}
            maxTimeIntervalHeight={110}
            halfLineContainerStyle={calendareStyles.container}
            viewMode={isView} /> 
            
            <FloatingAction
            actions={actions}
            color={"blue"}
            onPressItem={name => {
              onPressButton(name);
            }}
            floatingIcon= {require("../../../assets/calendar-icon.png")}
            iconWidth={30}
            iconHeight={23} /> 
        </> 
    );
    

    }

    export default Calendar; ` Thank you =)

    opened by ChristopherL-creator 1
  • Wrong time

    Wrong time

    I'm testing the library and it displays wrong time.

    "@howljs/calendar-kit": "^1.10.2"
    
    import {StyleSheet} from 'react-native';
    import React from 'react';
    import {TimelineCalendar, EventItem} from '@howljs/calendar-kit';
    
    const exampleEvents: EventItem[] = [
      {
        id: '1',
        title: 'Test1',
        start: '2022-12-20T11:00:44.098Z',
        end: '2022-12-20T12:00:44.301Z',
        color: '#A3C7D6',
      },
      {
        id: '2',
        title: 'test 2',
        start: '2022-12-18T10:00:05.313Z',
        end: '2022-12-18T11:00:05.313Z',
        color: '#B1AFFF',
      },
    ];
    
    export const Agenda = () => {
      return <TimelineCalendar viewMode="threeDays" events={exampleEvents} />;
    };
    
    export default Agenda;
    

    And result is like on the screen: Screenshot 2022-12-20 at 22 15 34

    There is one hour difference in app in comparison to data (exampleEvents). Eg. start: 10 in data but in app 11. Any idea what I'm doing wrong?

    PS. Passing timeZone prop results in crashing the app (timeZoneData is undefined)

    opened by k4wo 1
Releases(v1.10.5)
Owner
Lê Hậu
React Native Developer
Lê Hậu
Club-Event-Calendar-Webpage-Demo - Webpage Demo for Club Event Calendar

Club Event Calendar Webpage Demo Demo Repository for Club Event Calendar Webpage

Hyecheol (Jerry) Jang 1 Jan 9, 2022
A Simple Calendar App Built Using React.js

React Calendar App This is a calendar app, where you can set appointments. Getting started You can view a live demo over at https://calendar-app-appoi

Faroque Abdullah 9 Oct 30, 2022
A no dependencies, lightweight and feature-rich ⚡ calendar component for react.

@natscale/react-calendar A calendar component for react A no dependencies, lightweight and feature-rich ⚡ calendar component for react. ?? Table of Co

NatScale 67 Nov 14, 2022
A simple react based calendar component to be used for selecting dates and date ranges

simple-react-calendar A simple calendar component for React based applications. A component that is easy to start using, yet flexible when you need cu

Toptal 111 Dec 30, 2022
React calendar component with support for multiple views and events

Calend - calendar component for React Support for: day view three days view week view month view LIVE DEMO: https://calend.nibdo.com If given interfac

nibdo 135 Jan 1, 2023
A lightweight calendar-component for react-native.

react-native-ep-calendar 1. Installation react-native-ep-calendar requires react-native >= 0.63.4. It also uses react-native-svg to display icons. To

null 1 Dec 14, 2021
react datepicker component.(include persian jalaali calendar)

React DatePicker2 A simple and reusable Datepicker component for React (with persian jalali calendar support) Demo. This package uses react-persian-da

mohammadreza berneti 224 Oct 12, 2022
React.js Yearly Calendar Component

React-yearly-calendar React calendar component with yearly view. $ npm install react-yearly-calendar Demo http://belkalab.github.io/react-yearly-calen

Belka 552 Dec 9, 2022
React Calendar component

React Calendar component

Pon Cheol, Ku 0 Dec 25, 2022
A React component to display a GitHub contributions calendar

A React component to display a GitHub contributions calendar

Jonathan Gruber 189 Jan 2, 2023
A React component to display activity data in a calendar (heatmap)

React Activity Calendar A React component to display activity data in a calendar (heatmap). Demo and documentation (Storybook) Development Start the S

Jonathan Gruber 95 Jan 2, 2023
React calendar component

React Calendar Pane React calendar component in ES6 Check out the demo install npm install run tests npm test build the demo npm run demo Usage <Ca

tomkp 26 Aug 18, 2019
React component for calendar widget

React Input Calendar React component for calendar widget. Installation React Input Calendar is available as an npm package. npm install react-input-ca

Sergii Rudenko 139 Sep 2, 2022
A React calendar component with as few frills as humanly possible.

TT React Calendar Description A no-frills calendar widget that lets you bring your own styling. This component takes a start date, an end date, and a

TodayTix Group 10 Oct 7, 2022
A calendar component for React

A day/week/monthly calendar component for React Features Only includes the minimal amount of features needed. For instance, there is no paging control

Nathan Stitt 233 Nov 29, 2022
React Timer Machine - a fully controllable and customizable timer component for react

react-timer-machine React Timer Machine is a fully controllable and customizable timer component for react Install npm install --save react-timer-mach

Yassine Doghri 11 Jul 9, 2022
Simple date picker and calendar made for React and Day.js

react-dayjs-picker Simple date picker and calendar made for React and Day.js Demo/Documentation Demo and API docs are available here! Install npm inst

Grzegorz Raczek 14 Oct 9, 2022
gcal/outlook like calendar component

react-big-calendar An events calendar component built for React and made for modern browsers (read: IE10+) and uses flexbox over the classic tables-ce

Jason Quense 6.2k Dec 31, 2022
gcal/outlook like calendar component

react-big-calendar An events calendar component built for React and made for modern browsers (read: IE10+) and uses flexbox over the classic tables-ce

Jason Quense 6.2k Jan 8, 2023