官方的 React 组件用于 FullCalendar
FullCalendar 的官方 React 组件
安装 React 连接器、核心包以及任何插件(如 daygrid):
npm install @fullcalendar/react @fullcalendar/core @fullcalendar/daygrid渲染 FullCalendar 组件,并将 选项 作为属性提供:
import FullCalendar from '@fullcalendar/react'
import dayGridPlugin from '@fullcalendar/daygrid'
const events = [
{ title: 'Meeting', start: new Date() }
]
export function DemoApp() {
return (
)
}
// a custom render function
function renderEventContent(eventInfo) {
return (
<>
<b>{eventInfo.timeText}</b>
<i>{eventInfo.event.title}</i>
</>
)
}您必须使用 PNPM 安装此仓库:
pnpm install可用的脚本(通过 pnpm run <script>):
build - 构建可用于生产的分发文件dev - 构建和监视开发分发文件test - 无头测试test:dev - 交互式测试lintclean暂无开放 Issues,或尚未同步最近议题。