npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-full-calendars

v1.0.1

Published

React Native Full Calendar (RNFC) is an intuitive and powerful calendar component library designed for React Native.

Downloads

152

Readme

React Native Full Calendars (RNFC)

React Native Full Calendar (RNFC) is an intuitive and powerful calendar component library designed for React Native.

🚀 Features

  • Full Monthly Calendar: Displays events on a monthly basis.
  • Event Styling: Add multiple events per day with colors and styles.
  • Multi-Day Events: Visualize events that span across multiple days (e.g., team meetings, vacations).
  • Smooth Scrolling: Scroll seamlessly between months.

📖 Documentation

Check out the documentation website.

🔌 Installation

$ npm install react-native-full-calendars

OR

$ yarn add react-native-full-calendars

Dependencies

yarn add react-native-reanimated react-native-gesture-handler

Follow installation instructions for react-native-reanimated and react-native-gesture-handler

Basic Usage

import React, { useCallback, useState } from 'react';
import { Dimensions, SafeAreaView } from 'react-native';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import Calendar from 'react-native-full-calendars';
import { mockData } from './test';

function App(): React.JSX.Element {
    const [selectedDate, setSelectedDate] = useState<Date>(new Date());

    const handlePress = useCallback((date: Date) => {
        setSelectedDate(date);
    }, []);

    return (
        <GestureHandlerRootView>
            <SafeAreaView style={{ flex: 1 }}>
                <Calendar
                    selectedDate={selectedDate}
                    onPageChange={(date) => {
                        console.log(date);
                    }}
                    data={mockData}
                    onDatePress={handlePress}
                    width={Dimensions.get('window').width - 20}
                />
            </SafeAreaView>
        </GestureHandlerRootView>
    );
}

export default App;

Properties

| Property | Type | Default value | Description | | --------------------- | -------------------------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | data | CalendarData[] | | The data displayed in the calendar, including events | | ref? | Ref<CalendarController> | null | A reference to the CalendarController instance, allowing external control or state inspection of the calendar. | | selectedDate? | Date | | The currently selected date in the calendar. | | currentDate? | Date | new Date() | The date considered as the current day in the calendar. | | onDatePress? | (Date, DateOptions) => void | | Callback triggered when a date is pressed. | | onPageChange? | (Date) => void | | Callback triggered when the calendar page changes. | | buffer? | number | 1 | Number of additional pages to load before and after the current page. If buffer is 2, the calendar loads 2 pages before and 2 pages after the current page. | | maxDate? | Date | | The latest date the user can navigate to in the calendar. | | minDate? | Date | | The earliest date the user can navigate to in the calendar. | | maxVisibleCount? | number | 4 | The maximum number of items visible within a single date component. | | height? | number | | The height of the calendar component. | | width? | number | | The width of the calendar component. | | theme? | Theme | | Theme settings for customizing the calendar's appearance. | | weekStartDay? | WeekDayIndex | 0 (Sunday) | The first day of the week. | | renderDate? | RenderDate | | Function to render the content of a single day in the calendar. | | renderDayLabel? | RenderDayLabel | | Function to render the labels for days in the calendar (e.g., Mon, Tue). | | renderHeader? | RenderHeader | | Function to render the header of the calendar. | | renderMoreItemText? | RenderMoreItemText | | Function to render text indicating the number of additional items beyond the visible count. |

📄 License

MIT