syncfusion-react-calendar
Implementing Calendar (React)
Table of Contents
- When to Use This Skill
- Overview
- Quick Start (React)
- Guidance & Patterns
- References
- Troubleshooting & Tips
Overview
This skill provides: a short React Quick Start, recommended patterns (single-date, range selection, controlled components), and two reference files: a React-specific getting-started and a concise API reference derived from the Syncfusion React Calendar docs.
Target package: @syncfusion/ej2-react-calendars (CalendarComponent)
Quick Start (React)
Install
npm install @syncfusion/ej2-react-calendars @syncfusion/ej2-base
Basic Example (App.jsx)
import React, { useState } from 'react';
import { CalendarComponent } from '@syncfusion/ej2-react-calendars';
import '@syncfusion/ej2-base/styles/material3.css';
import '@syncfusion/ej2-calendars/styles/material3.css';
export default function App() {
const [value, setValue] = useState(new Date());
const onChange = (args) => setValue(args.value || args);
return (
<div style={{ padding: 20 }}>
<h3>Select a date</h3>
<CalendarComponent value={value} change={onChange} />
<p>Selected: {value.toDateString()}</p>
</div>
);
}
Notes:
- Use the
changeevent to sync selected date to React state. - Import theme CSS once (global or component-level) to style the control.
Guidance & Patterns
- Controlled component: keep source-of-truth in React state and update
valueviachangeevent. - Multi-selection: use
isMultiSelection={true}withvaluesprop andaddDate()/removeDate()methods. - Programmatic navigation: use a
refto callnavigateTo(view, date)— both arguments are required (see references/getting-started-react.md). - Date ranges: for range selection, use DateRangePicker (separate component). The Calendar itself does not have a built-in range highlight mode.
- Accessibility: use wrapper elements with
role="region"and a separatearia-liveregion for announcements — these are not direct Calendar props. - Week numbers: enable with
weekNumber={true}(the correct prop name).
References
Navigate to the reference that matches your current task:
Getting Started
📄 Read: references/getting-started-react.md
- Installation and npm setup
- React component examples
- CSS/theme imports
- Using refs and methods
Date Selection
📄 Read: references/date-selection.md
- Single date selection
- Multiple dates and ranges
- Min/max constraints
- Disabling specific dates
Calendar Views
📄 Read: references/calendar-views.md
- Month, Year, Decade views
- Navigating between views
- Initial and depth controls
- Programmatic navigation
Styling & Customization
📄 Read: references/styling-customization.md
- Theme selection and switching
- CSS class customization
- Custom day cell rendering
- RTL and responsive design
Events & Methods
📄 Read: references/events-methods.md
- Event handlers (change, created, renderDayCell)
- Using refs and imperative methods
- Advanced renderDayCell hook
- Event tracking patterns
Accessibility & Globalization
📄 Read: references/accessibility-globalization.md
- WCAG 2.1 compliance
- Keyboard navigation
- ARIA attributes
- Locale support and RTL
- Testing for accessibility
API Reference (Quick Lookup)
📄 Read: references/api-reference.md
- Props, events, methods at a glance
- Common enums and types
- Link to upstream docs
Troubleshooting & Tips
- Styles not applied: confirm CSS imports point to
node_modules/@syncfusion/ej2-calendars/styles/and are loaded before component styles. - React state mismatch: use the
valueprop andchangeevent to keep React state in sync — do not rely on framework-specific bindings. - Multiple date selection not working: ensure
isMultiSelection={true}and usevalues(notvalue) for the initial array. navigateTonot working: the method requires two arguments —navigateTo(view: CalendarView, date: Date).- "Cannot find module": run
npm install @syncfusion/ej2-react-calendars @syncfusion/ej2-baseand confirmpackage.json. - Week numbers not showing: use
weekNumber={true}(notshowWeekNumber).
More from syncfusion/react-ui-components-skills
syncfusion-react-grid
Implements Syncfusion React Grid component for feature-rich data tables and grids. Use this when working with data display, sorting, filtering, grouping, aggregates, editing, or exporting. This skill covers grid configuration, CRUD operations, virtual scrolling or infinite scrolling, hierarchy grids, state persistence, and advanced data management features for data-intensive applications.
104syncfusion-react-rich-text-editor
Implements the Syncfusion React Rich Text Editor (RichTextEditorComponent) from ej2-react-richtexteditor, supporting HTML (WYSIWYG) and Markdown editing. Use this skill for toolbar configuration, image/video/audio insertion, paste cleanup, AI assistant integration, emoji picker, slash menu, mentions, import/export Word/PDF, form validation, and source code view in React applications.
100syncfusion-react-themes
Use this skill when users need to apply themes, customize appearance, switch dark mode, use CSS variables, configure icons, or modify visual styling for Syncfusion React components. Covers icon library, size modes, and Theme Studio integration.
98syncfusion-react-scheduler
Implement Syncfusion React Scheduler component for calendar, event scheduling, and appointment management. Use this when building scheduling systems, calendar applications, booking systems, or time management interfaces. Covers all scheduler views (Day, Week, Month, Timeline, Agenda, Year), data binding, resource scheduling, recurring events, CRUD operations, drag-and-drop scheduling, customization, accessibility, and advanced features.
98syncfusion-react-common
Common utilities and features for Syncfusion React components. Use this skill when the user needs to implement animations, drag-and-drop, state persistence, RTL support, localization, globalization, security, templates, and advanced features for Syncfusion React components.
98syncfusion-react-gantt-chart
Implement, configure, and customize the Syncfusion React Gantt Chart component. Use this when building project scheduling applications with task timelines, dependencies, and resource management. Covers GanttComponent setup, task constraints, taskbar customization, filtering, sorting, Excel/PDF export, critical path analysis, milestones, predecessors, resource view, and baseline tracking.
96