Skip to content

syncfusion/blazor-ui-components-skills / skills/syncfusion-blazor-scheduler

syncfusion-blazor-scheduler

Verified

Implement Syncfusion Blazor Scheduler component for comprehensive appointment and event scheduling. Use this when building calendar interfaces, managing appointments with CRUD operations, implementing multiple view modes, setting up recurring events, or handling timezone-aware scheduling. This skill covers views (day, week, month, timeline, agenda), drag-and-drop functionality, resizing, resources, localization, data binding, state persistence, and advanced customization options for scheduling applications.

FileKindSize
SKILL.mdskill md27.1 KB
references/appointment-appearance.mdmarkdown13.0 KB
references/appointment-customization.mdmarkdown14.6 KB
references/appointment-drag-and-drop.mdmarkdown12.6 KB
references/appointment-resizing.mdmarkdown5.3 KB
references/appointments.mdmarkdown21.2 KB
references/cell-customization.mdmarkdown13.1 KB
references/clipboard.mdmarkdown18.7 KB
references/crud-actions.mdmarkdown27.3 KB
references/data-binding.mdmarkdown20.8 KB
references/dimensions.mdmarkdown7.4 KB
references/editor-advanced-customization.mdmarkdown18.6 KB
references/editor-template.mdmarkdown23.4 KB
references/event-buffer.mdmarkdown14.8 KB
references/events.mdmarkdown22.1 KB
references/exporting.mdmarkdown23.7 KB
references/getting-started.mdmarkdown5.4 KB
references/header-bar.mdmarkdown25.0 KB
references/header-rows.mdmarkdown27.2 KB
references/ics-import-and-printing.mdmarkdown7.0 KB
references/localization.mdmarkdown2.9 KB
references/quick-popup-and-validation.mdmarkdown11.8 KB
references/recurring-events.mdmarkdown12.8 KB
references/resource-grouping-and-customization.mdmarkdown25.9 KB
references/resources.mdmarkdown22.4 KB
references/row-auto-height.mdmarkdown7.9 KB
references/scheduler-styling.mdmarkdown6.9 KB
references/state-persistence.mdmarkdown3.8 KB
references/timescale.mdmarkdown5.3 KB
references/timezone.mdmarkdown6.7 KB
references/view-configuration-and-customization.mdmarkdown11.5 KB
references/views.mdmarkdown22.3 KB
references/virtual-scrolling.mdmarkdown28.0 KB
references/webassembly-performance.mdmarkdown5.1 KB
references/working-hours.mdmarkdown6.0 KB

references/ics-import-and-printing.md

View on GitHub
# ICS Import and Printing

## Table of Contents
- [Importing Events from ICS Files](#importing-events-from-ics-files)
- [Printing Scheduler](#printing-scheduler)
- [Printing with Options](#printing-with-options)
- [Export and Import Summary](#export-and-import-summary)
- [Common Patterns](#common-patterns)

## Importing Events from ICS Files

Import events from external ICS files using `ImportICalendarAsync` with file uploader:

```cshtml
@using Syncfusion.Blazor.Schedule
@using Syncfusion.Blazor.Inputs
@using System.IO

<SfUploader AllowedExtensions=".ics" Multiple="false">
    <UploaderButtons Browse="Choose ICS File"></UploaderButtons>
    <UploaderEvents ValueChange="OnFileSelect"></UploaderEvents>
</SfUploader>

<SfSchedule @ref="ScheduleRef" TValue="AppointmentData" Height="650px" @bind-SelectedDate="@CurrentDate">
    <ScheduleEventSettings DataSource="@DataSource"></ScheduleEventSettings>
    <ScheduleViews>
        <ScheduleView Option="View.Day"></ScheduleView>
        <ScheduleView Option="View.Week"></ScheduleView>
        <ScheduleView Option="View.Month"></ScheduleView>
    </ScheduleViews>
</SfSchedule>

@code {
    SfSchedule<AppointmentData> ScheduleRef;
    DateTime CurrentDate = new DateTime(2026, 3, 24);
    List<AppointmentData> DataSource = new List<AppointmentData>();

    public async Task OnFileSelect(UploadChangeEventArgs args)
    {
        foreach (var file in args.Files)
        {
            var stream = file.Stream;
            
            // Read file content as string
            using (var reader = new StreamReader(stream))
            {
                var fileContent = await reader.ReadToEndAsync();
                
                // Import ICS content into Scheduler
                await ScheduleRef.ImportICalendarAsync(fileContent);
            }
        }
    }

    public class AppointmentData
    {
        public int Id { get; set; }
        public string Subject { get; set; }
        public string Location { get; set; }
        public DateTime StartTime { get; set; }
        public DateTime EndTime { get; set; }
        public string Description { get; set; }
        public bool IsAllDay { get; set; }
        public string RecurrenceRule { get; set; }
        public string RecurrenceException { get; set; }
        public Nullable<int> RecurrenceID { get; set; }
    }
}
```

**Import Behavior:**
- ImportICalendarAsync accepts ICS file content as string
- Parses VEVENT entries from ICS
- Adds imported events to Scheduler DataSource
- Supports recurring events with RRULE
- Merges with existing appointments (doesn't replace)

## Printing Scheduler

Print Scheduler content with current view using `PrintAsync` method:

```cshtml
@using Syncfusion.Blazor.Schedule
@using Syncfusion.Blazor.Buttons

<SfButton Content="Print Scheduler" OnClick="OnPrint"></SfButton>

<SfSchedule @ref="ScheduleRef" TValue="AppointmentData" Height="650px" @bind-SelectedDate="@CurrentDate">
    <ScheduleEventSettings DataSource="@DataSource"></ScheduleEventSettings>
    <ScheduleViews>
        <ScheduleView Option="View.Day"></ScheduleView>
        <ScheduleView Option="View.Week"></ScheduleView>
        <ScheduleView Option="View.Month"></ScheduleView>
    </ScheduleViews>
</SfSchedule>

@code {
    SfSchedule<AppointmentData> ScheduleRef;
    DateTime CurrentDate = new DateTime(2026, 3, 24);
    
    List<AppointmentData> DataSource = new List<AppointmentData>
    {
        new AppointmentData 
        { 
            Id = 1, 
            Subject = "Conference", 
            StartTime = new DateTime(2026, 3, 24, 9, 0, 0), 
            EndTime = new DateTime(2026, 3, 24, 11, 0, 0) 
        }
    };

    public async Task OnPrint()
    {
        // Print current view without options
        await ScheduleRef.PrintAsync();
    }

    public class AppointmentData
    {
        public int Id { get; set; }
        public string Subject { get; set; }
        public DateTime StartTime { get; set; }
        public DateTime EndTime { get; set; }
        public bool IsAllDay { get; set; }
    }
}
```

**Print Behavior:**
- Prints current active view
- Opens browser print dialog
- User controls paper size, orientation, margins
- Includes all visible appointments in current view

## Printing with Options

Print with custom dimensions using `PrintOptions`:

```cshtml
@using Syncfusion.Blazor.Schedule
@using Syncfusion.Blazor.Buttons

<SfButton Content="Print with Custom Size" OnClick="OnPrintCustom"></SfButton>

<SfSchedule @ref="ScheduleRef" TValue="AppointmentData" Height="650px" @bind-SelectedDate="@CurrentDate">
    <ScheduleEventSettings DataSource="@DataSource"></ScheduleEventSettings>
    <ScheduleViews>
        <ScheduleView Option="View.Day"></ScheduleView>
        <ScheduleView Option="View.Week"></ScheduleView>
        <ScheduleView Option="View.Month"></ScheduleView>
    </ScheduleViews>
</SfSchedule>

@code {
    SfSchedule<AppointmentData> ScheduleRef;
    DateTime CurrentDate = new DateTime(2026, 3, 24);
    
    List<AppointmentData> DataSource = new List<AppointmentData>
    {
        new AppointmentData 
        { 
            Id = 1, 
            Subject = "Team Meeting", 
            StartTime = new DateTime(2026, 3, 24, 10, 0, 0), 
            EndTime = new DateTime(2026, 3, 24, 11, 30, 0) 
        }
    };

    public async Task OnPrintCustom()
    {
        // Print with custom width and height
        PrintOptions options = new PrintOptions 
        { 
            Width = "1000px",
            Height = "800px"
        };
        
        await ScheduleRef.PrintAsync(options);
    }

    public class AppointmentData
    {
        public int Id { get; set; }
        public string Subject { get; set; }
        public DateTime StartTime { get; set; }
        public DateTime EndTime { get; set; }
        public bool IsAllDay { get; set; }
    }
}
```

**PrintOptions Properties:**
- `Width` - Print area width (e.g., "1000px", "100%")
- `Height` - Print area height (e.g., "800px")
- Allows scaling of printed content
- User still controls final print settings

## Export and Import Summary

| Operation | Method | Output | Custom Options |
|-----------|--------|--------|-----------------|
| Excel Export | ExportToExcelAsync | .xlsx / .csv | Fields, Custom Data, Headers, FileName, DateFormat |
| ICS Export | ExportToICalendarAsync | .ics | Custom FileName |
| ICS Import | ImportICalendarAsync | Merged into DataSource | File content string |
| Print | PrintAsync | Browser print dialog | Width, Height |
| Customize Excel | OnExcelExporting event | Modified worksheet | Formatting, styles, content |

## Common Patterns

### Export Only High-Priority Events
Use CustomData option to filter and export specific subset of appointments

### Integrate with Outlook
Export to ICS format and open in Outlook, Google Calendar, or Apple Calendar

### Backup Events
Regular Excel export provides backup of all scheduling data

### Report Generation
Combine ExportToExcelAsync with custom headers and date formatting for professional reports

### Import External Calendars
Support importing calendars shared by team members or external partners via ICS
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall