fullcalendar/fullcalendar-react
关于
FullCalendar 的官方 React 组件
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- +1
- 15天
- 0
- 1个月
- -2
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文FullCalendar React Component
[!IMPORTANT] This repo shows FullCalendar v6. The current version is v7, which is developed in fullcalendar-workspace for now. This repo's code is lagging behind and will be updated.
In v7, plugins like dayGrid and timeGrid are no longer separate packages. Run
npm install @fullcalendar/react temporal-polyfilland import plugins from@fullcalendar/react/daygrid, etc. Don't install@fullcalendar/core,@fullcalendar/daygridor the other v6 packages with v7. See the v7 React docs.
The official React Component for FullCalendar
Installation
Install the React connector, the core package, and any plugins (like daygrid):
npm install @fullcalendar/react @fullcalendar/core @fullcalendar/daygrid
Usage
Render a FullCalendar component, supplying options as props:
import FullCalendar from '@fullcalendar/react'
import dayGridPlugin from '@fullcalendar/daygrid'
const events = [
{ title: 'Meeting', start: new Date() }
]
export function DemoApp() {
return (
<div>
<h1>Demo App</h1>
<FullCalendar
plugins={[dayGridPlugin]}
initialView='dayGridMonth'
weekends={false}
events={events}
eventContent={renderEventContent}
/>
</div>
)
}
// a custom render function
function renderEventContent(eventInfo) {
return (
<>
<b>{eventInfo.timeText}</b>
<i>{eventInfo.event.title}</i>
</>
)
}
Links
Development
You must install this repo with PNPM:
pnpm install
Available scripts (via pnpm run <script>):
build- build production-ready dist filesdev- build & watch development dist filestest- test headlesslytest:dev- test interactivelylintclean
探索相关项目
加载中…