This demo shows how to use DHTMLX React Scheduler with MobX in a Vite + React app.
The Scheduler UI is fully driven by observable MobX state (events, current view/date, config). Any user action inside Scheduler (create/update/delete) is routed through data.save into MobX store methods, keeping all mutation logic in one place.
- Day / week / month views with date navigation
- Create, edit, drag-and-drop, and delete events
- MobX store actions as the single source of truth for Scheduler data
- Read-only toggle via
config.readonly - Snapshot-based undo/redo for event changes
- Node.js: ^20.19.0 || >=22.12.0 (required by Vite 7)
- Package manager: npm (repo includes
package-lock.json)
# clone
git clone <repo-url>
cd <repo-folder>
# install
npm installnpm run devOpen: http://localhost:5173
- Create an event (double-click in the calendar or use the built-in UI)
- Edit the event (open the editor and change text/time)
- Drag an event to a new time slot
- Click Undo / Redo in the toolbar to revert/apply recent event changes
- Switch between Day / Week / Month and navigate dates using < / Today / >
src/components/Scheduler.tsx– Scheduler initialization +data.savebridge to the MobX storesrc/components/Toolbar.tsx– simple toolbar (views, navigation, undo/redo)src/store.ts– MobX store (events + snapshot-based history)src/seed/data.ts– deterministic seed events and initial view/date
createEvent()returns the created event with a finalid(simulating a backend-generated id). This keeps subsequent updates working after an item is created.- Undo/redo in this demo tracks event mutations only (view/date navigation is not part of history).
dev– run the app locallybuild– build for productionpreview– preview the production build locallylint- run ESLint
Source code in this repo is released under the MIT License.
DHTMLX React Scheduler is a commercial library - use it under a valid DHTMLX license or evaluation agreement.