This project shows how to use DHTMLX React Scheduler in a React + Vite + TypeScript app while keeping Scheduler state in a Valtio store.
The Scheduler is used as a controlled component: Valtio drives events, date, and view via props, and user edits are mapped back to store actions through the data.save callback. The demo also includes snapshot-based undo/redo.
- Day / Week / Month views controlled from a Material UI toolbar
- Date navigation (prev / today / next) stored in Valtio
- Event CRUD (create / update / delete) handled through
data.save - Snapshot-based undo/redo for events + view/date
- Seed dataset (
src/seed/data.ts) for a known-good starting state
- Node.js: 18+
- Package manager: npm
# clone
git clone <repo-url>
cd react-scheduler-valtio
# install
npm installnpm run devOpen: http://localhost:5173
- Switch between Day / Week / Month views in the toolbar.
- Use Prev / Today / Next to change the active date.
- Create or edit events using the Scheduler UI (default behavior is usually double-click to create and double-click to edit).
- Drag or resize an event and confirm the change is reflected in the Valtio store (it re-renders from updated props).
- Click Undo / Redo and confirm events, view, and date roll back / forward.
src/components/Scheduler.tsx– React Scheduler wrapper +data.savebridge to Valtio actionssrc/components/Toolbar.tsx– Material UI toolbar (view, navigation, undo/redo)src/store.ts– Valtio store with snapshot-based undo/redosrc/seed/data.ts– initial events + initial date/view
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.