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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-native-calendar-ui

v0.2.1

Published

⚡ High-performance headless calendar UI library for React Native - Powerful hooks + beautiful components for iOS, Android & Web

Readme

react-native-calendar-ui

npm version License: MIT TypeScript React Native

⚡ High-performance headless calendar UI library for React Native

The most flexible React Native calendar component library. Build beautiful, accessible calendars with powerful hooks and zero native dependencies. Works on iOS, Android, and Web out of the box.

Why react-native-calendar-ui?

  • 🎯 Headless Architecture — Full control over your UI with powerful React hooks
  • Blazing Fast — Pure JavaScript, no native bridge overhead
  • 📱 Cross-Platform — iOS, Android, Web, and Expo support
  • 🎨 Pre-built Components — Ready-to-use Calendar, CalendarGrid, CalendarHeader, and CalendarDay
  • 📅 Date Range Selection — Built-in range picker with min/max constraints
  • Multi-Date Selection — Select multiple individual dates
  • 🎉 Event Markers — Display events with customizable dots and colors
  • 🌍 Internationalization — Full i18n with locale, RTL, and first day of week support
  • 🌙 Dark Mode — Built-in light/dark themes with system detection
  • DateTime Picker — Time selection with 12h/24h formats
  • 📊 Multiple Views — Day, month, year, and decade views
  • 🔄 Recurring Dates — Daily, weekly, monthly, yearly patterns
  • Accessibility — Full screen reader and keyboard navigation support
  • 🪶 Lightweight — ~36KB packed, zero native dependencies
  • 🧪 Well Tested — 243+ tests with comprehensive coverage
  • 📦 Tree-Shakeable — Import only what you need

Installation

npm install react-native-calendar-ui
# or
yarn add react-native-calendar-ui
# or
bun add react-native-calendar-ui

No native linking required! Works instantly with Expo and bare React Native projects.

Requirements

  • React Native 0.74+
  • React 18.0+
  • iOS 13.0+ / Android API 24+ / Web

Quick Start

Pre-built Calendar Component

import { Calendar } from "react-native-calendar-ui";

export function App() {
  return (
    <Calendar
      onDateSelect={(date) => console.log("Selected:", date)}
      colors={{
        primary: "#007AFF",
        selectedText: "#FFFFFF",
      }}
    />
  );
}

Headless Hook (Full Customization)

import { useCalendar, DAYS, MONTHS } from "react-native-calendar-ui";

export function CustomCalendar() {
  const {
    year,
    month,
    days,
    selectDate,
    nextMonth,
    previousMonth,
    isToday,
    isDateSelected,
  } = useCalendar({
    onDateSelect: (date) => console.log("Selected:", date),
  });

  return (
    <View>
      <View style={styles.header}>
        <TouchableOpacity onPress={previousMonth}>
          <Text>←</Text>
        </TouchableOpacity>
        <Text>
          {MONTHS[month]} {year}
        </Text>
        <TouchableOpacity onPress={nextMonth}>
          <Text>→</Text>
        </TouchableOpacity>
      </View>

      <View style={styles.grid}>
        {days.map((day, index) => {
          const date = new Date(day.year, day.month, day.date);
          return (
            <TouchableOpacity
              key={index}
              onPress={() => selectDate(date)}
              style={[
                styles.day,
                isDateSelected(date) && styles.selected,
                isToday(date) && styles.today,
              ]}
            >
              <Text>{day.date}</Text>
            </TouchableOpacity>
          );
        })}
      </View>
    </View>
  );
}

Available Hooks

| Hook | Description | |------|-------------| | useCalendar | Core calendar state with single date selection | | useCalendarRange | Date range selection (start/end dates) | | useCalendarMulti | Multiple individual date selection | | useCalendarDateTime | Date + time selection | | useCalendarView | Switch between day/month/year/decade views | | useSwipeGesture | Touch gesture navigation | | useCalendarAnimation | Smooth transition animations | | useInfiniteCalendar | Virtual scrolling for large date ranges | | useAccessibility | Screen reader announcements |

Available Components

| Component | Description | |-----------|-------------| | Calendar | Full-featured calendar with built-in styling | | CalendarHeader | Month/year navigation header | | CalendarGrid | 6-week day grid layout | | CalendarDay | Individual day cell | | TimePicker | Time selection component | | MonthPicker | Month selection grid | | YearPicker | Year selection grid | | DateRangePresets | Quick range shortcuts (Today, Last 7 days, etc.) | | EventMarkers | Event dot indicators | | SwipeContainer | Gesture-enabled wrapper |

Utility Functions

import {
  getCalendarDays,
  addDays,
  addMonths,
  getDaysBetween,
  getDateRange,
  formatDate,
  isWeekend,
  isLeapYear,
  getWeekNumber,
} from "react-native-calendar-ui";

// Generate 42-day calendar grid
const days = getCalendarDays(2024, 11);

// Date arithmetic
const tomorrow = addDays(new Date(), 1);
const nextMonth = addMonths(new Date(), 1);

// Date ranges
const dayCount = getDaysBetween(startDate, endDate);
const allDates = getDateRange(startDate, endDate);

// Formatting with i18n
formatDate(date, { month: "long", year: "numeric" }, "fr-FR");

Date Range Selection

import { useCalendarRange } from "react-native-calendar-ui";

const { selectedRange, selectDate, isDateInRange, isRangeStart, isRangeEnd } =
  useCalendarRange({
    onRangeSelect: (range) => console.log(range.start, range.end),
    minRangeDuration: 1,
    maxRangeDuration: 30,
  });

Multi-Date Selection

import { useCalendarMulti } from "react-native-calendar-ui";

const { selectedDates, toggleDate, clearDates } = useCalendarMulti({
  onDatesSelect: (dates) => console.log(`${dates.length} dates selected`),
  maxSelections: 10,
});

Swipe Gestures

import { useCalendar, useSwipeGesture } from "react-native-calendar-ui";

const { nextMonth, previousMonth } = useCalendar();
const swipeHandlers = useSwipeGesture({
  onSwipeLeft: nextMonth,
  onSwipeRight: previousMonth,
});

return <View {...swipeHandlers}>{/* Calendar */}</View>;

TypeScript Support

Full type definitions included:

import type {
  CalendarDayData,
  DateRange,
  UseCalendarOptions,
  UseCalendarReturn,
  CalendarTheme,
} from "react-native-calendar-ui";

Cross-Platform Support

| Platform | Status | |----------|--------| | iOS | ✅ Fully supported | | Android | ✅ Fully supported | | Web | ✅ Fully supported | | Expo | ✅ No config plugin needed |

Performance

  • Pure JavaScript — No native bridge overhead
  • Memoized hooks — Optimized re-renders
  • Tree-shakeable — Only bundle what you use
  • ~36KB — Minimal bundle impact

Examples

See the example app for complete usage examples including:

  • Basic calendar
  • Date range picker
  • Multi-date selection
  • Custom themed calendars
  • Event calendars
  • DateTime picker
  • Swipe navigation
  • Internationalization

Contributing

Contributions welcome! Please see our GitHub repository.

License

MIT © Joao Paulo C Marra

Links


Keywords: react-native calendar, react native date picker, expo calendar, headless calendar, date range picker, multi date selection, calendar component, ios calendar, android calendar, cross-platform calendar, typescript calendar, react hooks calendar, mobile calendar ui