MCPcopy Index your code
hub / github.com/wix/react-native-calendars

github.com/wix/react-native-calendars @1.1314.0

repository ↗ · DeepWiki ↗ · release 1.1314.0 ↗ · + Follow
434 symbols 1,109 edges 125 files 14 documented · 3% updated 2mo ago1.1314.0 · 2026-01-29★ 10,295124 open issues
README

Stand With Ukraine

React Native Calendars 🗓️ 📆

A declarative cross-platform React Native calendar component for iOS and Android.

Version Build status

This module includes information on how to use this customizable React Native calendar component.

The package is compatible with both Android and iOS

Official documentation

This README provides basic examples of how to get started with react-native-calendars. For detailed information, refer to the official documentation site.

Features ✨

  • Pure JS. No Native code required
  • Date marking - dot, multi-dot, period, multi-period and custom marking
  • Customization of style, content (days, months, etc) and dates
  • Detailed documentation and examples
  • Swipeable calendar with flexible custom rendering
  • Scrolling to today, selecting dates, and more
  • Allowing or blocking certain dates
  • Accessibility support
  • Automatic date formatting for different locales

Try it out ⚡

You can run a sample module using these steps:

$ git clone git@github.com:wix/react-native-calendars.git

$ cd react-native-calendars

$ yarn install

$ cd ios && pod install && cd ..

$ react-native run-ios

You can check example screens source code in example module screens

This project is compatible with Expo/CRNA (without ejecting), and the examples have been published on Expo

Getting Started 🔧

Here's how to get started with react-native-calendars in your React Native project:

Install the package:

$ yarn add react-native-calendars

RN Calendars is implemented in JavaScript, so no native module linking is required.

Usage 🚀

Basic usage examples of the library

For detailed information on using this component, see the official documentation site

Importing the Calendar component

import {Calendar, CalendarList, Agenda} from 'react-native-calendars';

Use the Calendar component in your app:

<Calendar
  onDayPress={day => {
    console.log('selected day', day);
  }}
/>

Some Code Examples

Here are a few code snippets that demonstrate how to use some of the key features of react-native-calendars:

Creating a basic calendar with default settings:

import React, {useState} from 'react';
import {Calendar, LocaleConfig} from 'react-native-calendars';

const App = () => {
  const [selected, setSelected] = useState('');

  return (
    <Calendar
      onDayPress={day => {
        setSelected(day.dateString);
      }}
      markedDates={{
        [selected]: {selected: true, disableTouchEvent: true, selectedDotColor: 'orange'}
      }}
    />
  );
};

export default App;

Customize the appearance of the calendar:

<Calendar
  // Customize the appearance of the calendar
  style={{
    borderWidth: 1,
    borderColor: 'gray',
    height: 350
  }}
  // Specify the current date
  current={'2012-03-01'}
  // Callback that gets called when the user selects a day
  onDayPress={day => {
    console.log('selected day', day);
  }}
  // Mark specific dates as marked
  markedDates={{
    '2012-03-01': {selected: true, marked: true, selectedColor: 'blue'},
    '2012-03-02': {marked: true},
    '2012-03-03': {selected: true, marked: true, selectedColor: 'blue'}
  }}
/>

Configuring the locale:

import {LocaleConfig} from 'react-native-calendars';
import React, {useState} from 'react';
import {Calendar, LocaleConfig} from 'react-native-calendars';

LocaleConfig.locales['fr'] = {
  monthNames: [
    'Janvier',
    'Février',
    'Mars',
    'Avril',
    'Mai',
    'Juin',
    'Juillet',
    'Août',
    'Septembre',
    'Octobre',
    'Novembre',
    'Décembre'
  ],
  monthNamesShort: ['Janv.', 'Févr.', 'Mars', 'Avril', 'Mai', 'Juin', 'Juil.', 'Août', 'Sept.', 'Oct.', 'Nov.', 'Déc.'],
  dayNames: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'],
  dayNamesShort: ['Dim.', 'Lun.', 'Mar.', 'Mer.', 'Jeu.', 'Ven.', 'Sam.'],
  today: "Aujourd'hui"
};

LocaleConfig.defaultLocale = 'fr';

const App = () => {
  const [selected, setSelected] = useState('');

  return (
    <Calendar
      onDayPress={day => {
        setSelected(day.dateString);
      }}
      markedDates={{
        [selected]: {selected: true, disableTouchEvent: true, selectedDotColor: 'orange'}
      }}
    />
  );
};

export default App;

Adding a global theme to the calendar:

    <Calendar
      style={{
        borderWidth: 1,
        borderColor: 'gray',
        height: 350,
      }}
      theme={{
        backgroundColor: '#ffffff',
        calendarBackground: '#ffffff',
        textSectionTitleColor: '#b6c1cd',
        selectedDayBackgroundColor: '#00adf5',
        selectedDayTextColor: '#ffffff',
        todayTextColor: '#00adf5',
        dayTextColor: '#2d4150',
        textDisabledColor: '#dd99ee'
      }}
    />

Customized Calendar Examples

Calendar

Dot marking

Multi-Dot marking

Period Marking

Multi-Period marking

Custom marking

Date loading indicator

Scrollable semi-infinite calendar

Horizontal calendar

Agenda

Authors

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

Contributing

We welcome contributions to react-native-calendars.

If you have an idea for a new feature or have discovered a bug, please open an issue.

Please yarn test and yarn lint before pushing changes.

Don't forget to add a title and a description explaining the issue you're trying to solve and your proposed solution.

Screenshots and Gifs are VERY helpful to add to the PR for reviews.

Please DO NOT format the files - we're trying to keep a unified syntax and keep the reviewing process fast and simple.

License

React Native Calendars is MIT licensed

Extension points exported contracts — how you extend this code

ItemProps (Interface)
(no doc)
example/src/mocks/AgendaItem.tsx
Theme (Interface)
(no doc)
src/types.ts
ExpandableCalendarProps (Interface)
(no doc)
src/expandableCalendar/index.tsx
UseTimelineOffsetProps (Interface)
(no doc)
src/timeline/useTimelineOffset.ts
CalendarProps (Interface)
(no doc)
src/calendar/index.tsx
ReservationProps (Interface)
(no doc)
src/agenda/reservation-list/reservation.tsx
UseTimelinePagesProps (Interface)
(no doc)
src/timeline-list/useTimelinePages.ts
InfiniteListProps (Interface)
(no doc)
src/infinite-list/index.tsx

Core symbols most depended-on inside this repo

getDate
called by 40
example/src/mocks/timelineEvents.ts
getDate
called by 40
example/src/screens/calendarScreen.tsx
toMarkingFormat
called by 37
src/interface.ts
getDay
called by 32
src/calendar/driver.ts
getHeader
called by 29
src/calendar/driver.ts
tap
called by 28
src/calendar/day/driver.ts
generateDay
called by 24
src/dateutils.ts
getDate
called by 23
example/src/screens/calendarPlaygroundScreen.tsx

Shape

Function 248
Method 108
Interface 44
Class 28
Enum 6

Languages

TypeScript100%

Modules by API surface

src/expandableCalendar/driver.ts22 symbols
src/expandableCalendar/index.tsx20 symbols
src/dateutils.ts19 symbols
example/src/screens/calendarScreen.tsx19 symbols
src/calendar-list/driver.ts18 symbols
src/agenda/index.tsx16 symbols
example/src/screens/calendarPlaygroundScreen.tsx15 symbols
src/calendar/driver.ts13 symbols
src/agenda/reservation-list/index.tsx13 symbols
src/expandableCalendar/WeekCalendar/driver.ts11 symbols
src/expandableCalendar/Context/todayButton.tsx11 symbols
src/calendar/header/driver.ts11 symbols

Dependencies from manifests, versioned

@babel/core7.20.0 · 1×
@babel/eslint-parser7.13.4 · 1×
@babel/preset-env7.20.0 · 1×
@babel/runtime7.20.0 · 1×
@docusaurus/core2.0.0-beta.14 · 1×
@docusaurus/preset-classic2.0.0-beta.14 · 1×
@mdx-js/react1.6.21 · 1×
@react-native/babel-preset0.73.21 · 1×
@react-native/metro-config0.73.5 · 1×
@react-native/typescript-config0.73.1 · 1×
@testing-library/react-native11.0.0 · 1×

For agents

$ claude mcp add react-native-calendars \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact