Implementing ASP.NET Core Scheduler
The Syncfusion ASP.NET Core Scheduler is a comprehensive component for managing appointments, events, and schedules. It provides rich functionality for creating calendar-based applications with support for multiple views, resources, recurring events, and extensive customization options.
When to Use This Skill
- Appointment Management: Creating, editing, and deleting calendar appointments
- Multi-User Scheduling: Implementing resource scheduling for multiple users or resources
- Calendar Views: Displaying events in day, week, month, timeline, or agenda formats
- Recurring Events: Managing repeating appointments with complex recurrence rules
- Data Integration: Binding local or remote data sources to the Scheduler
- Custom Templates: Customizing event appearance and templates
- Working Hours: Configuring business hours, working days, and timezones
- Event Operations: Drag-and-drop rescheduling, resizing, and inline editing
Documentation and Navigation Guide
Getting Started
📄 Read: references/getting-started.md
- Installation and NuGet package setup
- Adding Tag Helper and script resources
- Registering Script Manager
- Basic Scheduler initialization
- Populating appointments and setting default date/view
Appointment Management
📄 Read: references/appointments.md
- Appointment data structure and field mapping
- Creating normal, all-day, spanned, and recurring events
- Appointment properties (Id, Subject, StartTime, EndTime, Location, Description)
- Recurring appointments and recurrence rules
- Exception handling for recurring events
- Drag-and-drop and inline editing
CRUD Operations
📄 Read: references/crud-operations.md
- Adding appointments (editor window, addEvent method, server-side insertion)
- Editing appointments (saveEvent method, normal and recurring events)
- Deleting appointments (deleteEvent method, handling series vs occurrences)
- Handling conflicts and validation
- Server-side database operations
- Batch operations for multiple changes
Clipboard Actions
📄 Read: references/clipboard-actions.md
- Enabling clipboard support with
allowClipboard property
- Cut, copy, and paste operations using Scheduler methods
- Cross-view and cross-Scheduler clipboard operations
Virtual Scrolling
📄 Read: references/virtual-scrolling.md
- Enabling
allowVirtualScrolling on Month and TimelineMonth views
- Generating large event and resource datasets for performance testing
Print, Excel Export, and iCalendar (ICS)
📄 Read: references/export-print.md
- Printing the Scheduler with default or custom height, width, and selected date
- Exporting appointments to Excel with customized field mappings
- Exporting appointments to an iCalendar (
.ics) file
- Importing appointments from an iCalendar (
.ics) file via the Uploader
Views and Configuration
📄 Read: references/views-and-modes.md
- Available view types (Day, Week, WorkWeek, Month, Year, Agenda, MonthAgenda, Timeline views)
- Setting currentView and switching between views
- View-specific configurations using e-schedule-views
- Customizing start/end hours, working days, timescales
- Date format and weekend display settings
- Max event stack configuration to limit visible events per cell
Scheduling Features
📄 Read: references/scheduling-features.md
- Timescale configuration (interval and slot count)
- Working days and business hours setup
- Timezone support (IANA timezones)
- Recurrence patterns (RFC 5545 format)
- Resource configuration and grouping
- Row auto height for timeline and month views
- Adaptive UI for responsive layouts
- Complete scheduling configuration example
Data Binding
📄 Read: references/data-binding.md
- Local data binding with DataSource
- Remote data binding with ODataV4Adaptor
- Custom adaptor creation
- Query parameters and filters
- AJAX data loading
- CRUD action configuration with UrlAdaptor
- Google Calendar integration
Resources and Grouping
📄 Read: references/resources-and-grouping.md
- Overview of resource scheduling patterns
- Single and multi-resource scheduling
- Resource grouping, color metadata, and working hours
- Timeline views and remote resource binding
Customization and Templates
📄 Read: references/customization.md
- Event templates and cell templates
- Event customization using eventRendered event
- Date Header templates
- Quick Info templates
- CSS class customization
- Tooltip templates and display options
- Custom editor window configuration
- Overlapping event prevention
Advanced Features
📄 Read: references/advanced-features.md
- Resource grouping and multi-resource scheduling
- Timezone support and conversion
- State persistence
- Localization and accessibility
- Inline appointment editing
- Read-only mode and appointment blocking
- Rate Limiting Guidance
- Timezone Validation
- Role-based Authorization Examples
Quick Start Example
<!-- _Layout.cshtml -->
<head>
<!-- refer syncfusion theme -->
<!-- refer syncfusion script -->
</head>
<body>
<!-- Scheduler will render here -->
<ejs-scripts></ejs-scripts>
</body>
<!-- Index.cshtml -->
@addTagHelper *, Syncfusion.EJ2
<ejs-schedule id="schedule" width="100%" height="550" selectedDate="new DateTime(2024, 3, 28)" currentView="Week">
<e-schedule-eventsettings dataSource="ViewBag.datasource"></e-schedule-eventsettings>
</ejs-schedule>
// Controller
public class HomeController : Controller
{
public IActionResult Index()
{
ViewBag.datasource = new List<AppointmentData>
{
new AppointmentData {
Id = 1,
Subject = "Meeting",
StartTime = new DateTime(2024, 3, 28, 9, 0, 0),
EndTime = new DateTime(2024, 3, 28, 10, 0, 0)
}
};
return View();
}
}
public class AppointmentData
{
public int Id { get; set; }
public string Subject { get; set; }
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }
}
Common Patterns
Adding Events Programmatically
// Use addEvent method to create appointments
<script>
var scheduleObj = document.getElementById('schedule').ej2_instances[0];
scheduleObj.addEvent({
Id: 2,
Subject: 'New Meeting',
StartTime: new Date(2024, 2, 28, 10, 0),
EndTime: new Date(2024, 2, 28, 11, 0)
});
</script>
Handling CRUD Operations
// Server-side in DataManager with CrudUrl
var dataManager = new DataManager() {
Url = "Home/GetData",
Adaptor = "UrlAdaptor",
CrudUrl = "Home/UpdateData",
// Configure server-side CORS with explicit allowed origins rather than relying on a client-side CrossDomain flag.
};
Creating Recurring Events
// RecurrenceRule follows iCalendar (RFC 5545) format
new AppointmentData {
Id = 1,
Subject = "Daily Standup",
StartTime = new DateTime(2024, 3, 28, 9, 0, 0),
EndTime = new DateTime(2024, 3, 28, 9, 30, 0),
RecurrenceRule = "FREQ=DAILY;INTERVAL=1;COUNT=10"
}
Configuring Multiple Views
<ejs-schedule id="schedule" currentView="Week">
<e-schedule-views>
<e-schedule-view option="Day"></e-schedule-view>
<e-schedule-view option="Week"></e-schedule-view>
<e-schedule-view option="Month"></e-schedule-view>
<e-schedule-view option="TimelineDay"></e-schedule-view>
</e-schedule-views>
</ejs-schedule>
Key Properties and Events
Core Scheduler Properties
currentView: Active view type (Day, Week, WorkWeek, Month, Year, Agenda, MonthAgenda, TimelineDay, TimelineWeek, TimelineWorkWeek, TimelineMonth, TimelineYear)
selectedDate: Current date displayed on Scheduler
readonly: Disables all CRUD operations when true
allowDragAndDrop: Enables drag-and-drop (default: true)
allowResizing: Enables event resizing (default: true)
allowMultiDrag: Enables dragging multiple events simultaneously
allowInline: Enables inline editing of event subject
allowOverlap: Prevents overlapping events when false
allowClipboard: Enables clipboard support (cut, copy, paste) on the Scheduler (default: false).
rowAutoHeight: Auto-adjusts work cell height to fit all appointments in the same time range (applies to timeline views and month view)
enableAdaptiveUI: Enables adaptive (responsive) layout for smaller screens
height and width: Dimension settings
cssClass: Custom CSS class for styling
Event Settings Properties
dataSource: Binds appointment data (array or DataManager)
template: Custom template for event display
enableTooltip: Shows tooltip for appointments
tooltipTemplate: Customizes tooltip content
enableMaxHeight: Events occupy full cell height
enableIndicator: Shows more indicator for multiple events
spannedEventPlacement: AllDayRow or TimeSlot for multi-day events
sortComparer: Custom sort function for overlapping events
editFollowingEvents: Allows editing current and following recurring events
maxEventStack: Per-view maximum number of event labels to display per cell. 0 shows all events; positive values show the count plus a +n more indicator.
Event Field Mapping
id: Unique appointment identifier (required)
subject: Appointment title
startTime: Start date/time (required)
endTime: End date/time (required)
isAllDay: All-day event flag
location: Event location
description: Event details
recurrenceRule: Recurrence pattern (iCalendar format)
recurrenceID: Parent recurring event ID for exceptions
recurrenceException: Excluded dates from recurrence
followingID: Parent event ID for "following events" edits
startTimezone: Start time timezone (IANA timezone names)
endTimezone: End time timezone
isReadonly: Individual event read-only flag
isBlock: Time slot blocking flag
Important Events
actionBegin: Triggered before CRUD actions
actionComplete: Triggered after CRUD actions complete
actionFailure: Triggered on server errors
eventRendered: Triggered before event rendering (customization)
dragStart: Triggered when dragging begins
dragStop: Triggered when dragging ends
resizeStart: Triggered when resizing begins
popupOpen: Triggered before editor window opens
tooltipOpen: Triggered before tooltip displays
dataBound: Triggered after data binding completes
Public Methods
addEvent(eventData): Add single or multiple appointments
saveEvent(eventData, action): Update existing appointments
deleteEvent(eventData, action): Delete appointments
getEvents(): Retrieve all appointments
getCurrentViewEvents(): Get appointments in current view
getEventDetails(element): Get event data from UI element
refreshEvents(): Refresh appointments without full reload
navigateTo(date): Navigate to specific date
navigatePrevious(): Go to previous time period
navigateNext(): Go to next time period
isSlotAvailable(date, endDate, resourceId): Check slot availability
openOverlapAlert(): Show overlap validation alert
cut(elements): Cut the specified appointment(s) into the clipboard (requires allowClipboard="true")
copy(elements): Copy the specified appointment(s) into the clipboard (requires allowClipboard="true")
paste(targetElement): Paste the clipboard content at the target cell (requires allowClipboard="true")
closeQuickInfoPopup(): Close the quick info popup (useful when opening the context menu)
Related Skills
1---2name: syncfusion-aspnetcore-scheduler3description: Implement Syncfusion ASP.NET Core Scheduler component for scheduling appointments, events, and resource management. Use this when creating calendar scheduling solutions with appointment management, resource scheduling, multiple calendar views (day, week, month, timeline), recurring events, and CRUD operations. This skill covers data binding, timezone support, event templates, and timescale configuration.4---56# Implementing ASP.NET Core Scheduler78The Syncfusion ASP.NET Core Scheduler is a comprehensive component for managing appointments, events, and schedules. It provides rich functionality for creating calendar-based applications with support for multiple views, resources, recurring events, and extensive customization options.910## When to Use This Skill1112- **Appointment Management:** Creating, editing, and deleting calendar appointments13- **Multi-User Scheduling:** Implementing resource scheduling for multiple users or resources14- **Calendar Views:** Displaying events in day, week, month, timeline, or agenda formats15- **Recurring Events:** Managing repeating appointments with complex recurrence rules16- **Data Integration:** Binding local or remote data sources to the Scheduler17- **Custom Templates:** Customizing event appearance and templates18- **Working Hours:** Configuring business hours, working days, and timezones19- **Event Operations:** Drag-and-drop rescheduling, resizing, and inline editing2021## Documentation and Navigation Guide2223### Getting Started24📄 **Read:** [references/getting-started.md](references/getting-started.md)25- Installation and NuGet package setup26- Adding Tag Helper and script resources27- Registering Script Manager28- Basic Scheduler initialization29- Populating appointments and setting default date/view3031### Appointment Management32📄 **Read:** [references/appointments.md](references/appointments.md)33- Appointment data structure and field mapping34- Creating normal, all-day, spanned, and recurring events35- Appointment properties (Id, Subject, StartTime, EndTime, Location, Description)36- Recurring appointments and recurrence rules37- Exception handling for recurring events38- Drag-and-drop and inline editing3940### CRUD Operations41📄 **Read:** [references/crud-operations.md](references/crud-operations.md)42- Adding appointments (editor window, addEvent method, server-side insertion)43- Editing appointments (saveEvent method, normal and recurring events)44- Deleting appointments (deleteEvent method, handling series vs occurrences)45- Handling conflicts and validation46- Server-side database operations47- Batch operations for multiple changes4849### Clipboard Actions50📄 **Read:** [references/clipboard-actions.md](references/clipboard-actions.md)51- Enabling clipboard support with `allowClipboard` property52- Cut, copy, and paste operations using Scheduler methods53- Cross-view and cross-Scheduler clipboard operations5455### Virtual Scrolling56📄 **Read:** [references/virtual-scrolling.md](references/virtual-scrolling.md)57- Enabling `allowVirtualScrolling` on Month and TimelineMonth views58- Generating large event and resource datasets for performance testing5960### Print, Excel Export, and iCalendar (ICS)61📄 **Read:** [references/export-print.md](references/export-print.md)62- Printing the Scheduler with default or custom height, width, and selected date63- Exporting appointments to Excel with customized field mappings64- Exporting appointments to an iCalendar (`.ics`) file65- Importing appointments from an iCalendar (`.ics`) file via the Uploader6667### Views and Configuration68📄 **Read:** [references/views-and-modes.md](references/views-and-modes.md)69- Available view types (Day, Week, WorkWeek, Month, Year, Agenda, MonthAgenda, Timeline views)70- Setting currentView and switching between views71- View-specific configurations using e-schedule-views72- Customizing start/end hours, working days, timescales73- Date format and weekend display settings74- Max event stack configuration to limit visible events per cell7576### Scheduling Features77📄 **Read:** [references/scheduling-features.md](references/scheduling-features.md)78- Timescale configuration (interval and slot count)79- Working days and business hours setup80- Timezone support (IANA timezones)81- Recurrence patterns (RFC 5545 format)82- Resource configuration and grouping83- Row auto height for timeline and month views84- Adaptive UI for responsive layouts85- Complete scheduling configuration example8687### Data Binding88📄 **Read:** [references/data-binding.md](references/data-binding.md)89- Local data binding with DataSource90- Remote data binding with ODataV4Adaptor91- Custom adaptor creation92- Query parameters and filters93- AJAX data loading94- CRUD action configuration with UrlAdaptor95- Google Calendar integration9697### Resources and Grouping98📄 **Read:** [references/resources-and-grouping.md](references/resources-and-grouping.md)99- Overview of resource scheduling patterns100- Single and multi-resource scheduling101- Resource grouping, color metadata, and working hours102- Timeline views and remote resource binding103104### Customization and Templates105📄 **Read:** [references/customization.md](references/customization.md)106- Event templates and cell templates107- Event customization using eventRendered event108- Date Header templates109- Quick Info templates110- CSS class customization111- Tooltip templates and display options112- Custom editor window configuration113- Overlapping event prevention114115### Advanced Features116📄 **Read:** [references/advanced-features.md](references/advanced-features.md)117- Resource grouping and multi-resource scheduling118- Timezone support and conversion119- State persistence120- Localization and accessibility121- Inline appointment editing122- Read-only mode and appointment blocking123- Rate Limiting Guidance124- Timezone Validation125- Role-based Authorization Examples126127## Quick Start Example128129```cshtml130<!-- _Layout.cshtml -->131<head>132 <!-- refer syncfusion theme -->133 <!-- refer syncfusion script -->134</head>135<body>136 <!-- Scheduler will render here -->137 <ejs-scripts></ejs-scripts>138</body>139140<!-- Index.cshtml -->141@addTagHelper *, Syncfusion.EJ2142143<ejs-schedule id="schedule" width="100%" height="550" selectedDate="new DateTime(2024, 3, 28)" currentView="Week">144 <e-schedule-eventsettings dataSource="ViewBag.datasource"></e-schedule-eventsettings>145</ejs-schedule>146147// Controller148public class HomeController : Controller149{150 public IActionResult Index()151 {152 ViewBag.datasource = new List<AppointmentData>153 {154 new AppointmentData { 155 Id = 1, 156 Subject = "Meeting", 157 StartTime = new DateTime(2024, 3, 28, 9, 0, 0),158 EndTime = new DateTime(2024, 3, 28, 10, 0, 0)159 }160 };161 return View();162 }163}164165public class AppointmentData166{167 public int Id { get; set; }168 public string Subject { get; set; }169 public DateTime StartTime { get; set; }170 public DateTime EndTime { get; set; }171}172```173174## Common Patterns175176### Adding Events Programmatically177```csharp178// Use addEvent method to create appointments179<script>180var scheduleObj = document.getElementById('schedule').ej2_instances[0];181scheduleObj.addEvent({182 Id: 2,183 Subject: 'New Meeting',184 StartTime: new Date(2024, 2, 28, 10, 0),185 EndTime: new Date(2024, 2, 28, 11, 0)186});187</script>188```189190### Handling CRUD Operations191```csharp192// Server-side in DataManager with CrudUrl193var dataManager = new DataManager() {194 Url = "Home/GetData",195 Adaptor = "UrlAdaptor",196 CrudUrl = "Home/UpdateData",197 // Configure server-side CORS with explicit allowed origins rather than relying on a client-side CrossDomain flag.198};199```200201### Creating Recurring Events202```csharp203// RecurrenceRule follows iCalendar (RFC 5545) format204new AppointmentData {205 Id = 1,206 Subject = "Daily Standup",207 StartTime = new DateTime(2024, 3, 28, 9, 0, 0),208 EndTime = new DateTime(2024, 3, 28, 9, 30, 0),209 RecurrenceRule = "FREQ=DAILY;INTERVAL=1;COUNT=10"210}211```212213### Configuring Multiple Views214```cshtml215<ejs-schedule id="schedule" currentView="Week">216 <e-schedule-views>217 <e-schedule-view option="Day"></e-schedule-view>218 <e-schedule-view option="Week"></e-schedule-view>219 <e-schedule-view option="Month"></e-schedule-view>220 <e-schedule-view option="TimelineDay"></e-schedule-view>221 </e-schedule-views>222</ejs-schedule>223```224225## Key Properties and Events226227### Core Scheduler Properties228- `currentView`: Active view type (Day, Week, WorkWeek, Month, Year, Agenda, MonthAgenda, TimelineDay, TimelineWeek, TimelineWorkWeek, TimelineMonth, TimelineYear)229- `selectedDate`: Current date displayed on Scheduler230- `readonly`: Disables all CRUD operations when true231- `allowDragAndDrop`: Enables drag-and-drop (default: true)232- `allowResizing`: Enables event resizing (default: true)233- `allowMultiDrag`: Enables dragging multiple events simultaneously234- `allowInline`: Enables inline editing of event subject235- `allowOverlap`: Prevents overlapping events when false236- `allowClipboard`: Enables clipboard support (cut, copy, paste) on the Scheduler (default: false).237- `rowAutoHeight`: Auto-adjusts work cell height to fit all appointments in the same time range (applies to timeline views and month view)238- `enableAdaptiveUI`: Enables adaptive (responsive) layout for smaller screens239- `height` and `width`: Dimension settings240- `cssClass`: Custom CSS class for styling241242### Event Settings Properties243- `dataSource`: Binds appointment data (array or DataManager)244- `template`: Custom template for event display245- `enableTooltip`: Shows tooltip for appointments246- `tooltipTemplate`: Customizes tooltip content247- `enableMaxHeight`: Events occupy full cell height248- `enableIndicator`: Shows more indicator for multiple events249- `spannedEventPlacement`: AllDayRow or TimeSlot for multi-day events250- `sortComparer`: Custom sort function for overlapping events251- `editFollowingEvents`: Allows editing current and following recurring events252- `maxEventStack`: Per-view maximum number of event labels to display per cell. `0` shows all events; positive values show the count plus a `+n more` indicator.253254### Event Field Mapping255- `id`: Unique appointment identifier (required)256- `subject`: Appointment title257- `startTime`: Start date/time (required)258- `endTime`: End date/time (required)259- `isAllDay`: All-day event flag260- `location`: Event location261- `description`: Event details262- `recurrenceRule`: Recurrence pattern (iCalendar format)263- `recurrenceID`: Parent recurring event ID for exceptions264- `recurrenceException`: Excluded dates from recurrence265- `followingID`: Parent event ID for "following events" edits266- `startTimezone`: Start time timezone (IANA timezone names)267- `endTimezone`: End time timezone268- `isReadonly`: Individual event read-only flag269- `isBlock`: Time slot blocking flag270271### Important Events272- `actionBegin`: Triggered before CRUD actions273- `actionComplete`: Triggered after CRUD actions complete274- `actionFailure`: Triggered on server errors275- `eventRendered`: Triggered before event rendering (customization)276- `dragStart`: Triggered when dragging begins277- `dragStop`: Triggered when dragging ends278- `resizeStart`: Triggered when resizing begins279- `popupOpen`: Triggered before editor window opens280- `tooltipOpen`: Triggered before tooltip displays281- `dataBound`: Triggered after data binding completes282283### Public Methods284- `addEvent(eventData)`: Add single or multiple appointments285- `saveEvent(eventData, action)`: Update existing appointments286- `deleteEvent(eventData, action)`: Delete appointments287- `getEvents()`: Retrieve all appointments288- `getCurrentViewEvents()`: Get appointments in current view289- `getEventDetails(element)`: Get event data from UI element290- `refreshEvents()`: Refresh appointments without full reload291- `navigateTo(date)`: Navigate to specific date292- `navigatePrevious()`: Go to previous time period293- `navigateNext()`: Go to next time period294- `isSlotAvailable(date, endDate, resourceId)`: Check slot availability295- `openOverlapAlert()`: Show overlap validation alert296- `cut(elements)`: Cut the specified appointment(s) into the clipboard (requires `allowClipboard="true"`)297- `copy(elements)`: Copy the specified appointment(s) into the clipboard (requires `allowClipboard="true"`)298- `paste(targetElement)`: Paste the clipboard content at the target cell (requires `allowClipboard="true"`)299- `closeQuickInfoPopup()`: Close the quick info popup (useful when opening the context menu)300301## Related Skills302- [Data Binding Patterns](../data-binding/) - Connecting data sources303- [Custom Event Templates](../customization/) - Styling and presentation304- [Resource Scheduling](../advanced-features/) - Multi-user and resource management