react-big-calendar vs react-calendar vs react-date-picker vs react-datepicker
日付選択およびカレンダーライブラリ
react-big-calendarreact-calendarreact-date-pickerreact-datepicker類似パッケージ:

日付選択およびカレンダーライブラリ

これらのライブラリは、Reactアプリケーションにおける日付選択やカレンダー表示を簡素化するために設計されています。ユーザーが日付や時間を選択するためのインターフェースを提供し、さまざまな機能を通じてユーザーエクスペリエンスを向上させます。これにより、開発者はカスタムソリューションを構築する手間を省き、迅速に機能を実装できます。

npmのダウンロードトレンド

3 年

GitHub Starsランキング

統計詳細

パッケージ
ダウンロード数
Stars
サイズ
Issues
公開日時
ライセンス
react-big-calendar08,6872.6 MB4261年前MIT
react-calendar03,782271 kB371ヶ月前MIT
react-date-picker01,348146 kB221ヶ月前MIT
react-datepicker08,3654.5 MB655ヶ月前MIT

機能比較: react-big-calendar vs react-calendar vs react-date-picker vs react-datepicker

カレンダー表示

  • react-big-calendar:

    大規模なカレンダー表示を提供し、月、週、日単位でのビューをサポートします。イベントの表示やカスタムレンダリングが可能で、複雑なスケジュール管理に適しています。

  • react-calendar:

    シンプルで直感的なカレンダーを提供し、日付の選択が容易です。基本的な月表示を中心に設計されており、カスタマイズも可能です。

  • react-date-picker:

    日付選択に特化したコンポーネントで、カレンダーのポップアップ表示が特徴です。選択した日付を簡単に表示でき、カスタマイズも可能です。

  • react-datepicker:

    カスタマイズ可能な日付ピッカーを提供し、ユーザーが直感的に日付を選択できるインターフェースを持っています。時間選択機能もあり、柔軟性があります。

カスタマイズ性

  • react-big-calendar:

    多くのカスタマイズオプションがあり、イベントのスタイルやカレンダーのレイアウトを自由に変更できます。特定のニーズに合わせた拡張が可能です。

  • react-calendar:

    基本的なスタイルのカスタマイズが可能で、シンプルなデザインを維持しつつ、必要に応じて変更できます。

  • react-date-picker:

    豊富なカスタマイズオプションを提供し、日付フォーマットやスタイルを自由に設定できます。

  • react-datepicker:

    スタイルや機能を柔軟にカスタマイズでき、特に時間選択のインターフェースを調整することができます。

ユーザーエクスペリエンス

  • react-big-calendar:

    直感的なインターフェースを提供し、ドラッグ&ドロップによるイベントの管理が可能です。ユーザーが簡単にスケジュールを確認・変更できるように設計されています。

  • react-calendar:

    シンプルで使いやすいインターフェースを持ち、日付の選択が直感的です。特に、初心者でも扱いやすい設計です。

  • react-date-picker:

    ユーザーが簡単に日付を選択できるように設計されており、ポップアップカレンダーが直感的です。

  • react-datepicker:

    ユーザーがスムーズに日付と時間を選択できるように設計されており、視覚的にわかりやすいインターフェースを提供します。

国際化対応

  • react-big-calendar:

    多言語対応が可能で、地域に応じたカスタマイズが容易です。

  • react-calendar:

    基本的な国際化機能をサポートしており、日付フォーマットを地域に合わせて調整できます。

  • react-date-picker:

    国際化に対応しており、異なる言語や地域のフォーマットに簡単に適応できます。

  • react-datepicker:

    多言語対応が可能で、地域に応じた日付フォーマットをサポートします。

パフォーマンス

  • react-big-calendar:

    大規模なデータセットを扱う際のパフォーマンスが優れており、効率的にイベントを表示できます。

  • react-calendar:

    軽量でパフォーマンスが高く、シンプルなカレンダー表示に最適です。

  • react-date-picker:

    日付選択に特化しているため、パフォーマンスが良好で、スムーズなユーザー体験を提供します。

  • react-datepicker:

    パフォーマンスが高く、特に多くのユーザーが同時に使用する場合でもスムーズに動作します。

選び方: react-big-calendar vs react-calendar vs react-date-picker vs react-datepicker

  • react-big-calendar:

    大規模なカレンダー表示が必要な場合や、複雑なスケジュール管理機能を実装したい場合に最適です。特に、イベントの表示やドラッグ&ドロップ機能が必要な場合に選択してください。

  • react-calendar:

    シンプルなカレンダーコンポーネントが必要で、基本的な日付選択機能を求めている場合に適しています。軽量で、簡単にカスタマイズできるため、手軽に導入できます。

  • react-date-picker:

    日付の選択が主な目的で、カスタマイズ可能なUIが必要な場合に選択してください。特に、日付範囲の選択や、特定のフォーマットでの表示が必要な場合に便利です。

  • react-datepicker:

    ユーザーが日付を選択するための直感的なインターフェースを提供したい場合に最適です。特に、時間選択機能やカスタムスタイルが必要な場合に選択してください。

react-big-calendar のREADME

react-big-calendar

An events calendar component built for React and designed for modern browsers (read: not IE) and uses flexbox over the classic tables-caption approach.

Big Calendar Demo Image

DEMO and Docs

Inspired by Full Calendar.

Use and Setup

yarn add react-big-calendar or npm install --save react-big-calendar

Include react-big-calendar/lib/css/react-big-calendar.css for styles, and make sure your calendar's container element has a height, or the calendar won't be visible. To provide your own custom styling, see the Custom Styling topic.

Starters

Run examples locally

$ git clone git@github.com:jquense/react-big-calendar.git
$ cd react-big-calendar
$ yarn
$ yarn storybook

Localization and Date Formatting

react-big-calendar includes four options for handling the date formatting and culture localization, depending on your preference of DateTime libraries. You can use either the Moment.js, Globalize.js, date-fns, Day.js localizers.

Regardless of your choice, you must choose a localizer to use this library:

Moment.js

import { Calendar, momentLocalizer } from 'react-big-calendar'
import moment from 'moment'

const localizer = momentLocalizer(moment)

const MyCalendar = (props) => (
  <div>
    <Calendar
      localizer={localizer}
      events={myEventsList}
      startAccessor="start"
      endAccessor="end"
      style={{ height: 500 }}
    />
  </div>
)

Globalize.js v0.1.1

import { Calendar, globalizeLocalizer } from 'react-big-calendar'
import globalize from 'globalize'

const localizer = globalizeLocalizer(globalize)

const MyCalendar = (props) => (
  <div>
    <Calendar
      localizer={localizer}
      events={myEventsList}
      startAccessor="start"
      endAccessor="end"
      style={{ height: 500 }}
    />
  </div>
)

date-fns v2

import { Calendar, dateFnsLocalizer } from 'react-big-calendar'
import format from 'date-fns/format'
import parse from 'date-fns/parse'
import startOfWeek from 'date-fns/startOfWeek'
import getDay from 'date-fns/getDay'
import enUS from 'date-fns/locale/en-US'

const locales = {
  'en-US': enUS,
}

const localizer = dateFnsLocalizer({
  format,
  parse,
  startOfWeek,
  getDay,
  locales,
})

const MyCalendar = (props) => (
  <div>
    <Calendar
      localizer={localizer}
      events={myEventsList}
      startAccessor="start"
      endAccessor="end"
      style={{ height: 500 }}
    />
  </div>
)

Day.js

Note that the dayjsLocalizer extends Day.js with the following plugins:

import { Calendar, dayjsLocalizer } from 'react-big-calendar'
import dayjs from 'dayjs'

const localizer = dayjsLocalizer(dayjs)

const MyCalendar = (props) => (
  <div>
    <Calendar
      localizer={localizer}
      events={myEventsList}
      startAccessor="start"
      endAccessor="end"
      style={{ height: 500 }}
    />
  </div>
)

Custom Styling

Out of the box, you can include the compiled CSS files and be up and running. But, sometimes, you may want to style Big Calendar to match your application styling. For this reason, SASS files are included with Big Calendar.

  @import 'react-big-calendar/lib/sass/styles';
  @import 'react-big-calendar/lib/addons/dragAndDrop/styles'; // if using DnD

SASS implementation provides a variables file containing color and sizing variables that you can update to fit your application. Note: Changing and/or overriding styles can cause rendering issues with your Big Calendar. Carefully test each change accordingly.

Join The Community

Help us improve Big Calendar! Join us on Slack. (Slack invite links do expire. If you can't get in, just file an issue and we'll get a new link.)

Translations