full-calendar
Use when building, configuring, or debugging a FullCalendar instance — views, event sources, callbacks, drag-and-drop, or render hooks. Triggers on: "FullCalendar", "event calendar", "dayGrid"/"timeGrid", "events show on the wrong day" (exclusive end dates), "calendar not rendering", "dateClick or drag-drop not working" (missing interaction plugin), a JSON event feed, or wiring a calendar into an HTMX-driven app.
- License 许可
- Unlicense
- 最近更新
- 2026-10-28
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- full-calendar
- description
- Use when building, configuring, or debugging a FullCalendar instance — views, event sources, callbacks, drag-and-drop, or render hooks. Triggers on: "FullCalendar", "event calendar", "dayGrid"/"timeGrid", "events show on the wrong day" (exclusive end dates), "calendar not rendering", "dateClick or drag-drop not working" (missing interaction plugin), a JSON event feed, or wiring a calendar into an HTMX-driven app.
02 资源文件 9
- 参考文档evals/evals.json2.8 KB
- 参考文档evals/trigger-evals.json3.5 KB
- 参考文档references/callbacks.md7.4 KB
- 参考文档references/display.md7.0 KB
- 参考文档references/events.md7.0 KB
- 参考文档references/htmx-patterns.md9.4 KB
- 参考文档references/initialization.md4.3 KB
- 参考文档references/REFERENCE.md4.9 KB
- 参考文档references/views.md6.9 KB
03 SKILL.md 正文
FullCalendar Skill
Comprehensive reference for FullCalendar v6 — a full-sized, drag-and-drop event calendar rendered entirely in JavaScript. FullCalendar is plugin-based, framework-agnostic (with optional React/Vue/Angular connectors), and works naturally with server-rendered backends via JSON feeds.
Quick Start
- Identify what you need: initialization, event data, user interaction, or display customization.
- Open the matching reference file (see Reference Map below).
- Use the vanilla JS API — FullCalendar's
Calendarclass, not framework wrappers — unless the project explicitly uses React/Vue/Angular connectors. - For HTMX-driven apps, prefer the JSON feed event source and server-rendered content patterns described in
htmx-patterns.md.
Critical Rules
enddates are exclusive. An event ending2024-09-03spans through2024-09-02and stops before2024-09-03. This matches iCalendar RFC 5545 and Google Calendar API semantics. Agents and backend code producing event JSON must respect this — off-by-one end dates are the most common FullCalendar bug.interactionplugin is required fordateClick,selectable, and drag/resize. It is NOT required foreventClickoreventMouseEnter/eventMouseLeave. The standard CDN bundle includes it, but ES6 users must import@fullcalendar/interactionand add it toplugins: [].- JSON feed dates must be ISO8601 strings or millisecond timestamps. Native JS
Dateobjects cannot be serialized to JSON. Do not sendnew Date(...)strings. - Dynamic option changes use
setOption()/getOption(). ButeventsandeventSourcescannot be dynamically set — useaddEventSource()/refetchEvents()instead.initialDateandinitialViewcannot be set either — usegotoDate()andchangeView(). - Non-standard event properties go to
extendedProps. During parsing, any property not in the standard set is moved intoevent.extendedProps. Access them there, not on the event root. - Content injection varies by environment. In vanilla JS,
eventContentreturns text,{ html }, or{ domNodes }. React/Vue/Angular connectors have their own content injection patterns — do not mix them. allDayinference. IfallDayis not explicitly set, FullCalendar infers it fromstart/endformats. ISO strings without time parts (e.g.,2024-09-01) are treated as all-day; strings with time parts are not.- Toolbar values are space/comma separated. Space = gap between groups. Comma = adjacent buttons. Example:
'prev,next today'puts prev/next together, then a gap, then today. - Timezone shifts come from
timeZonemismatches. FullCalendar defaults to the browser's local timezone. ISO date strings with UTC offsets are converted into the calendar's zone; strings without offsets are taken as-is. Named timezones (anything beyondlocal/UTC) require a timezone plugin — without one they silently degrade to UTC — and JSON feeds receive the active zone viatimeZoneParamso the backend can respond consistently.
Core Concepts
FullCalendar has a small set of concepts that recur everywhere:
- Calendar instance: created with
new FullCalendar.Calendar(el, options)(global bundle) ornew Calendar(el, { plugins: [...], ...options })(ES6). Call.render()to mount. - Plugins: each view type and feature is a separate package. The standard CDN bundle (
fullcalendar/index.global.min.js) includes core, interaction, daygrid, timegrid, list, and multimonth. - Event sources: where events come from — an array, a JSON feed URL, or a function. FullCalendar auto-fetches when the visible date range changes.
- Callbacks (handlers): functions you pass as options that fire on user interaction or lifecycle events (e.g.,
eventClick,dateClick,datesSet). - Render hooks: four-hook pattern (
*ClassNames,*Content,*DidMount,*WillUnmount) for customizing the DOM of events, day cells, headers, etc. - Content injection: render hooks that accept
*Contentcan return plain text,{ html: '...' },{ domNodes: [...] }, or a function returning any of these.
HTMX Integration Context
FullCalendar and HTMX serve complementary roles. FullCalendar handles the calendar grid, date math, and client-side interactions. The backend provides event data via JSON. The key integration points:
- Event data: use a JSON feed URL that your backend serves. FullCalendar sends
startandendquery params automatically. - Event interactions: on
eventClickordateClick, trigger HTMX requests to load modals/panels with server-rendered HTML, rather than building client-side forms. - Navigation: FullCalendar handles its own month/week navigation. If you need the navigation to also update other page elements, use
datesSetcallback to trigger HTMX requests. - Alternative approach: for simpler calendars, skip FullCalendar entirely and render the grid server-side with HTMX-powered navigation (see
htmx-patterns.mdfor this pattern).
Reference Map
| File | Covers |
|---|---|
references/initialization.md |
CDN setup, ES6 imports, Calendar constructor, plugin system, destroy/re-render |
references/events.md |
Event model, parsing rules, sources (array, JSON feed, function), Event Object API, event methods |
references/views.md |
Available views, view plugins, toolbar, navigation, date display, sizing |
references/callbacks.md |
All callbacks: dateClick, eventClick, select, eventDrop, eventResize, datesSet, loading, lifecycle |
references/display.md |
Event display options, render hooks, content injection, CSS customization, colors |
references/htmx-patterns.md |
HTMX+FullCalendar integration, server-side calendar grid alternative, modal patterns |
references/REFERENCE.md |
Cross-file index and quick lookup table |
Task Routing
| Task | Start here |
|---|---|
| Add a calendar to a page | initialization.md |
| Load events from backend API | events.md |
| Handle clicks, selections, drag-drop | callbacks.md |
| Customize event appearance | display.md |
| Configure toolbar, switch views | views.md |
| Integrate with HTMX backend | htmx-patterns.md |
| Look up a specific option/method | REFERENCE.md |
04 同仓库更多 Skills
wizard
Generate an interactive bash wizard that walks a human through a manual procedure — third-party setup, credential provisioning, a one-off migration — opening URLs, capturing values, confirming each step, and writing .env files and CI secrets (GitHub and Gitea/Forgejo Actions).
restore-test-pyramid
Analyze the project's E2E suite and push every assertion that doesn't need a real browser down to a faster integration or unit test, proving each migration honest before thinning E2E.
ponytail-debt
Harvest SHORTCUT markers from the codebase and report them grouped by file, flagging any missing upgrade paths.
humanify
Repair an inherited or human-blocked ticket for agent implementation, or finish its explicit human-only outcome.
fix-pr
Repair an existing pull request's review findings and target-branch conflicts, verify the result, and update the same open PR.
feature-milestones
Reconstruct a fragmented backlog as finishable feature milestones with explicit delivery boundaries and an approval-gated tracker update.