Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

react-native-calendars

> 前端框架
Open source

React Native Calendar Components ️

10.3K stars0 likes1 views
WebsiteGitHub

About

React Native Calendar Components ️

React Native Calendars ️

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


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 [email protected]: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

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

Use the Calendar component in your app:

javascript
<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:

javascript
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:

javascript
<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:

…

Adding a global theme to the calendar:

javascript
    <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

  • Tautvilas Mecinskas - Initial code - @tautvilas
  • Katrin Zotchev - Initial design - @katrin_zot

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

Issues· 150 open

View all issuesOpen on GitHub
  • #2791

    CalendarList: allow substituting the internal FlatList (e.g. BottomSheetFlatList, FlashList)

    Updated Sep 1, 2026
  • #2788

    Avoid bundling the full lodash package for a single `includes` import

    Updated Jun 19, 2026
  • #2778

    `ExpandableCalendar` knob: rapid taps leave calendar in a desynced state

    Updated Jun 17, 2026
  • #2768

    sluggish in Modal

    Updated Jun 8, 2026
  • #2770

    Asset request for generic @2x/@3x path fails when package only has platform-specific assets (.ios.png / .android.png)

    Updated May 29, 2026
  • #2591

    Agenda dates disappearing on component load

    Updated May 20, 2026
  • #2783

    Calendar - Day components crash app (Yoga layout)

    Updated Apr 28, 2026
  • #2781

    Agenda renders items under wrong date when navigating to a date other than the initial selected

    Updated Apr 21, 2026
  • #2743

    Agenda Error on Expo SDK 54

    Updated Apr 10, 2026
  • #2592

    Agenda Initially Expanded and Non-Responsive in iOS

    Updated Apr 7, 2026

> Tags

TypeScriptandroidcalendarhacktoberfestios

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架