Source Of Truth
Use only:
- The current project's files, structure, and established patterns
- DHTMLX MCP for React Scheduler API details: https://docs.dhtmlx.com/mcp
- Official DHTMLX React Scheduler docs as fallback: https://docs.dhtmlx.com/scheduler/integrations/react/
Never invent props, hooks, templates, callback signatures, event names, or backend behavior.
If any React Scheduler API detail is unclear, resolve it through DHTMLX MCP before writing code.
Preflight
Before writing code, identify:
- package:
@dhtmlx/trial-react-scheduler or @dhx/react-scheduler — check package.json, imports, lockfiles
- runtime: React, Next.js (needs
"use client"), Remix, or other React-based setup
- ownership model: React-managed (default) or Scheduler-managed (large datasets, Scheduler-centric app)
- persistence: local only,
data.save (default, single-entity), or data.batchSave (bulk sync)
Workflow
- Confirm the installed DHTMLX React Scheduler package and import path.
- Decide the data ownership model before implementing features.
- Read only the reference file needed for the task:
- React integration/setup: references/react-integration.md
- CRUD, state, and persistence: references/data-and-crud.md
- Failure cases and guardrails: references/known-failures.md
- Advanced patterns (views, resources, conflicts, undo/redo): references/advanced-patterns.md
- Styling, theming, CSS variables, selectors, and template-based visual customization: references/styling-and-theming.md
- Use DHTMLX MCP before relying on advanced or unfamiliar APIs.
- Implement with documented APIs only.
MCP Server
This skill relies on DHTMLX MCP for API verification. If the dhtmlx-mcp tool is not available, ask the user to add it:
Claude Code:
claude mcp add --transport http dhtmlx-mcp https://docs.dhtmlx.com/mcp
Codex:
codex mcp add dhtmlx-mcp --url https://docs.dhtmlx.com/mcp
If MCP is not available, use the official docs at https://docs.dhtmlx.com/scheduler/integrations/react/ as fallback.
Consult MCP First For
Consult DHTMLX MCP before using or changing:
- template callbacks you have not already verified
- recurring event payload shape (
rrule, recurring_event_id, original_start, deleted, duration) and the modals.onRecurrenceConfirm flow
config.lightbox.sections section types and map_to conventions
plugins prop keys and plugin dependencies (for example treetimeline requires timeline)
- timeline/units view configuration (
property, y_property, x_unit, x_step, x_size)
- advanced props such as
batchSave, customLightbox, modals, views, customViews, or filter
- event handler signatures (
on<EventName>) when behavior is not fully clear
- theme/skin values supported by the
theme prop, individual --dhx-scheduler-* variables and their inheritance defaults (full catalog: scheduler-docs/docs/guides/theme-css-variables.md), and runtime view-switch behavior via ref instance API
Hard Rules
- The Scheduler container must have explicit height.
- CSS import must match the installed package and be a separate import line.
- Activate plugins through the
plugins prop (plugins={{ recurring: true }}). The core scheduler.plugins({...}) instance method is also supported, but the prop form is tidier, requires less code, and offers no benefit to reach for the instance when the prop covers it.
- Switch skin/theme through the
theme prop (default terrace). Do not branch theme through ref.instance.setSkin() when the prop is wired.
- Use the app theme as the single source of truth.
- Prefer JavaScript
Date objects for start_date and end_date in React-managed mode.
- Normalize date values before persistence.
data.save callbacks receive SerializedEvent (date strings), not Date instances.
- Build backend payloads explicitly from normalized event models.
- Do not use undocumented internals when a documented prop or ref API exists.
- Do not mix React-managed props and imperative instance mutations unless synchronization is intentional.
Quick Checklist
1---2name: dhtmlx-react-scheduler3description: Builds and integrates DHTMLX React Scheduler into React applications. Covers setup, props, templates, themes, data.save, data.batchSave, and React integration patterns for @dhtmlx/trial-react-scheduler and @dhx/react-scheduler. Applies when working with booking calendars, resource scheduling, event CRUD, timeline/day/week/month views, lightboxes, or scheduling conflict checks in React apps — regardless of whether "DHTMLX" is mentioned by name. Provides verified API guidance rather than guessing React Scheduler APIs.4---56## Source Of Truth78Use only:91. The current project's files, structure, and established patterns102. DHTMLX MCP for React Scheduler API details: https://docs.dhtmlx.com/mcp113. Official DHTMLX React Scheduler docs as fallback: https://docs.dhtmlx.com/scheduler/integrations/react/1213Never invent props, hooks, templates, callback signatures, event names, or backend behavior.1415If any React Scheduler API detail is unclear, resolve it through DHTMLX MCP before writing code.1617## Preflight1819Before writing code, identify:20- **package**: `@dhtmlx/trial-react-scheduler` or `@dhx/react-scheduler` — check `package.json`, imports, lockfiles21- **runtime**: React, Next.js (needs `"use client"`), Remix, or other React-based setup22- **ownership model**: React-managed (default) or Scheduler-managed (large datasets, Scheduler-centric app)23- **persistence**: local only, `data.save` (default, single-entity), or `data.batchSave` (bulk sync)2425## Workflow26271. Confirm the installed DHTMLX React Scheduler package and import path.282. Decide the data ownership model before implementing features.293. Read only the reference file needed for the task:30 - React integration/setup: [references/react-integration.md](references/react-integration.md)31 - CRUD, state, and persistence: [references/data-and-crud.md](references/data-and-crud.md)32 - Failure cases and guardrails: [references/known-failures.md](references/known-failures.md)33 - Advanced patterns (views, resources, conflicts, undo/redo): [references/advanced-patterns.md](references/advanced-patterns.md)34 - Styling, theming, CSS variables, selectors, and template-based visual customization: [references/styling-and-theming.md](references/styling-and-theming.md)354. Use DHTMLX MCP before relying on advanced or unfamiliar APIs.365. Implement with documented APIs only.3738## MCP Server3940This skill relies on DHTMLX MCP for API verification. If the `dhtmlx-mcp` tool is not available, ask the user to add it:4142Claude Code:43```bash44claude mcp add --transport http dhtmlx-mcp https://docs.dhtmlx.com/mcp45```4647Codex:48```bash49codex mcp add dhtmlx-mcp --url https://docs.dhtmlx.com/mcp50```5152If MCP is not available, use the official docs at https://docs.dhtmlx.com/scheduler/integrations/react/ as fallback.5354## Consult MCP First For5556Consult DHTMLX MCP before using or changing:57- template callbacks you have not already verified58- recurring event payload shape (`rrule`, `recurring_event_id`, `original_start`, `deleted`, `duration`) and the `modals.onRecurrenceConfirm` flow59- `config.lightbox.sections` section types and `map_to` conventions60- `plugins` prop keys and plugin dependencies (for example `treetimeline` requires `timeline`)61- timeline/units view configuration (`property`, `y_property`, `x_unit`, `x_step`, `x_size`)62- advanced props such as `batchSave`, `customLightbox`, `modals`, `views`, `customViews`, or `filter`63- event handler signatures (`on<EventName>`) when behavior is not fully clear64- theme/skin values supported by the `theme` prop, individual `--dhx-scheduler-*` variables and their inheritance defaults (full catalog: `scheduler-docs/docs/guides/theme-css-variables.md`), and runtime view-switch behavior via `ref` instance API6566## Hard Rules6768- The Scheduler container must have explicit height.69- CSS import must match the installed package and be a separate import line.70- Activate plugins through the `plugins` prop (`plugins={{ recurring: true }}`). The core `scheduler.plugins({...})` instance method is also supported, but the prop form is tidier, requires less code, and offers no benefit to reach for the instance when the prop covers it.71- Switch skin/theme through the `theme` prop (default `terrace`). Do not branch theme through `ref.instance.setSkin()` when the prop is wired.72- Use the app theme as the single source of truth.73- Prefer JavaScript `Date` objects for `start_date` and `end_date` in React-managed mode.74- Normalize date values before persistence. `data.save` callbacks receive `SerializedEvent` (date strings), not `Date` instances.75- Build backend payloads explicitly from normalized event models.76- Do not use undocumented internals when a documented prop or ref API exists.77- Do not mix React-managed props and imperative instance mutations unless synchronization is intentional.7879## Quick Checklist8081- [ ] Correct package identified82- [ ] Matching CSS import used83- [ ] Explicit height provided84- [ ] Required features enabled via the `plugins` prop85- [ ] Skin selected via the `theme` prop (not `setSkin()`)86- [ ] Data ownership model chosen87- [ ] Dates normalized before persistence88- [ ] Advanced APIs verified with MCP