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/appointment-customization.md

View on GitHub
# Appointment Customization

## Table of Contents
- [Customizing Appointments with Template](#customizing-appointments-with-template)
- [Using EventRendered Event](#using-eventrendered-event)
- [Customizing with Attributes](#customizing-with-attributes)
- [Using CssClass Field](#using-cssclass-field)
- [Using CssClass Property on Scheduler](#using-cssclass-property-on-scheduler)
- [Display Tooltips for Appointments](#display-tooltips-for-appointments)
- [Conditional Customization](#conditional-customization)
- [Important Notes](#important-notes)

## Customizing Appointments with Template

Apply custom HTML templates to change appointment appearance:

```cshtml
@using Syncfusion.Blazor.Schedule

<SfSchedule TValue="AppointmentData" Height="650px" @bind-SelectedDate="@CurrentDate">
    <ScheduleEventSettings DataSource="@DataSource">
        <Template>
            <div class="appointment-template">
                <div class="subject">@((context as AppointmentData).Subject)</div>
                <div class="time">@((context as AppointmentData).StartTime.ToString("hh:mm tt"))</div>
                <div class="location">📍 @((context as AppointmentData).Location)</div>
            </div>
        </Template>
    </ScheduleEventSettings>
    <ScheduleViews>
        <ScheduleView Option="View.Day"></ScheduleView>
        <ScheduleView Option="View.Week"></ScheduleView>
        <ScheduleView Option="View.Month"></ScheduleView>
    </ScheduleViews>
</SfSchedule>

<style>
    .appointment-template {
        padding: 5px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-radius: 4px;
        height: 100%;
    }
    
    .appointment-template .subject {
        font-weight: bold;
        margin-bottom: 2px;
    }
    
    .appointment-template .time {
        font-size: 12px;
        opacity: 0.9;
    }
    
    .appointment-template .location {
        font-size: 11px;
    }
</style>

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

    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; }
    }
}
```

## Using EventRendered Event

Customize appointments based on conditions before rendering:

```cshtml
@using Syncfusion.Blazor.Schedule

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

<style>
    .e-schedule .e-appointment.high-priority {
        background-color: #ff4757 !important;
        border-left: 4px solid #c92a2a !important;
    }
    
    .e-schedule .e-appointment.medium-priority {
        background-color: #ffa502 !important;
        border-left: 4px solid #ff6348 !important;
    }
    
    .e-schedule .e-appointment.completed {
        background-color: #2ed573 !important;
        text-decoration: line-through;
        opacity: 0.7;
    }
</style>

@code{
    DateTime CurrentDate = new DateTime(2026, 3, 24);
    
    public void OnEventRendered(EventRenderedArgs<AppointmentData> args)
    {
        if (args.Data.Priority == "High")
        {
            args.CssClasses = new List<string> { "high-priority" };
        }
        else if (args.Data.Priority == "Medium")
        {
            args.CssClasses = new List<string> { "medium-priority" };
        }
        
        if (args.Data.Status == "Completed")
        {
            args.CssClasses.Add("completed");
        }
    }
    
    List<AppointmentData> DataSource = new List<AppointmentData>
    {
        new AppointmentData 
        { 
            Id = 1,
            Subject = "Critical Issue",
            Priority = "High",
            Status = "Active",
            StartTime = new DateTime(2026, 3, 24, 9, 0, 0),
            EndTime = new DateTime(2026, 3, 24, 10, 0, 0)
        },
        new AppointmentData 
        { 
            Id = 2,
            Subject = "Review Task",
            Priority = "Medium",
            Status = "Completed",
            StartTime = new DateTime(2026, 3, 24, 11, 0, 0),
            EndTime = new DateTime(2026, 3, 24, 12, 0, 0)
        }
    };

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

## Customizing with Attributes

Add or modify HTML attributes dynamically:

```cshtml
@using Syncfusion.Blazor.Schedule

<SfSchedule TValue="AppointmentData" Height="650px" @bind-SelectedDate="@CurrentDate">
    <ScheduleEvents TValue="AppointmentData" EventRendered="OnEventRendered"></ScheduleEvents>
    <ScheduleEventSettings DataSource="@DataSource"></ScheduleEventSettings>
    <ScheduleViews>
        <ScheduleView Option="View.Week"></ScheduleView>
    </ScheduleViews>
</SfSchedule>

@code{
    DateTime CurrentDate = new DateTime(2026, 3, 24);
    
    public void OnEventRendered(EventRenderedArgs<AppointmentData> args)
    {
        var attributes = new Dictionary<string, object>
        {
            { "style", $"background: {GetColorByStatus(args.Data.Status)}; border-radius: 4px;" },
            { "title", args.Data.Subject + " - " + args.Data.Status },
            { "data-status", args.Data.Status }
        };
        args.Attributes = attributes;
    }
    
    private string GetColorByStatus(string status)
    {
        return status switch
        {
            "Confirmed" => "#4CAF50",
            "Pending" => "#FF9800",
            "Cancelled" => "#F44336",
            _ => "#2196F3"
        };
    }
    
    List<AppointmentData> DataSource = new List<AppointmentData>
    {
        new AppointmentData 
        { 
            Id = 1,
            Subject = "Confirmed",
            Status = "Confirmed",
            StartTime = new DateTime(2026, 3, 24, 9, 0, 0),
            EndTime = new DateTime(2026, 3, 24, 10, 0, 0)
        }
    };

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

## Using CssClass Field

Apply CSS classes directly from data model:

```cshtml
@using Syncfusion.Blazor.Schedule

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

<style>
    /* Event type styles */
    .e-schedule .e-appointment.meeting {
        background-color: #3498db;
        color: white;
    }
    
    .e-schedule .e-appointment.conference {
        background-color: #9b59b6;
        color: white;
    }
    
    .e-schedule .e-appointment.training {
        background-color: #1abc9c;
        color: white;
    }
    
    .e-schedule .e-appointment.lunch {
        background-color: #e74c3c;
        color: white;
        border-bottom: 3px dotted #c0392b;
    }
</style>

@code{
    DateTime CurrentDate = new DateTime(2026, 3, 24);
    
    List<AppointmentData> DataSource = new List<AppointmentData>
    {
        new AppointmentData 
        { 
            Id = 1,
            Subject = "Team Meeting",
            CssClass = "meeting",
            StartTime = new DateTime(2026, 3, 24, 9, 0, 0),
            EndTime = new DateTime(2026, 3, 24, 10, 0, 0)
        },
        new AppointmentData 
        { 
            Id = 2,
            Subject = "Annual Conference",
            CssClass = "conference",
            StartTime = new DateTime(2026, 3, 24, 10, 30, 0),
            EndTime = new DateTime(2026, 3, 24, 12, 0, 0)
        },
        new AppointmentData 
        { 
            Id = 3,
            Subject = "Lunch Break",
            CssClass = "lunch",
            StartTime = new DateTime(2026, 3, 24, 12, 0, 0),
            EndTime = new DateTime(2026, 3, 24, 13, 0, 0)
        }
    };

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

## Using CssClass Property on Scheduler

Apply global styles to all appointments:

```cshtml
@using Syncfusion.Blazor.Schedule

<SfSchedule TValue="AppointmentData" Height="550px" CssClass="custom-scheduler" @bind-SelectedDate="@CurrentDate">
    <ScheduleEventSettings DataSource="@DataSource"></ScheduleEventSettings>
    <ScheduleViews>
        <ScheduleView Option="View.Week"></ScheduleView>
        <ScheduleView Option="View.Month"></ScheduleView>
    </ScheduleViews>
</SfSchedule>

<style>
    /* Apply custom styles to all appointments in this scheduler */
    .custom-scheduler.e-schedule .e-appointment {
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        font-weight: 500;
        letter-spacing: 0.5px;
    }
    
    .custom-scheduler.e-schedule .e-appointment:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }
</style>

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

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

## Display Tooltips for Appointments

Show additional information on hover:

```cshtml
@using Syncfusion.Blazor.Schedule

<SfSchedule TValue="AppointmentData" Height="650px" @bind-SelectedDate="@CurrentDate">
    <ScheduleEventSettings DataSource="@DataSource" EnableTooltip="true">
        <TooltipTemplate>
            <div class="tooltip-content">
                <strong>@((context as AppointmentData).Subject)</strong>
                <div>📍 @((context as AppointmentData).Location)</div>
                <div>⏰ @((context as AppointmentData).StartTime.ToString("hh:mm tt")) - @((context as AppointmentData).EndTime.ToString("hh:mm tt"))</div>
                <div>📝 @((context as AppointmentData).Description)</div>
            </div>
        </TooltipTemplate>
    </ScheduleEventSettings>
    <ScheduleViews>
        <ScheduleView Option="View.Month"></ScheduleView>
    </ScheduleViews>
</SfSchedule>

<style>
    .tooltip-content {
        padding: 10px;
        background: #333;
        color: white;
        border-radius: 4px;
        font-size: 12px;
    }
</style>

@code{
    DateTime CurrentDate = new DateTime(2026, 3, 24);
    
    List<AppointmentData> DataSource = new List<AppointmentData>
    {
        new AppointmentData 
        { 
            Id = 1,
            Subject = "Project Kickoff",
            Location = "Room 201",
            Description = "Discuss project scope and timeline",
            StartTime = new DateTime(2026, 3, 24, 9, 0, 0),
            EndTime = new DateTime(2026, 3, 24, 10, 30, 0)
        }
    };

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

## Conditional Customization

Customize based on appointment data:

```cshtml
@using Syncfusion.Blazor.Schedule

<SfSchedule TValue="AppointmentData" Height="650px" @bind-SelectedDate="@CurrentDate">
    <ScheduleEvents TValue="AppointmentData" EventRendered="OnEventRendered"></ScheduleEvents>
    <ScheduleEventSettings DataSource="@DataSource">
        <Template>
            <div class="@GetTemplateClass((context as AppointmentData))">
                <span class="urgency">@GetUrgencyIcon((context as AppointmentData))</span>
                <strong>@((context as AppointmentData).Subject)</strong>
            </div>
        </Template>
    </ScheduleEventSettings>
    <ScheduleViews>
        <ScheduleView Option="View.Week"></ScheduleView>
    </ScheduleViews>
</SfSchedule>

@code{
    DateTime CurrentDate = new DateTime(2026, 3, 24);
    
    private string GetTemplateClass(AppointmentData data)
    {
        return data.Priority switch
        {
            "High" => "appointment high-urgent",
            "Medium" => "appointment medium-urgent",
            _ => "appointment low-urgent"
        };
    }
    
    private string GetUrgencyIcon(AppointmentData data)
    {
        return data.Priority switch
        {
            "High" => "🔴",
            "Medium" => "🟡",
            _ => "🟢"
        };
    }
    
    List<AppointmentData> DataSource = new List<AppointmentData>
    {
        new AppointmentData 
        { 
            Id = 1,
            Subject = "Critical",
            Priority = "High",
            StartTime = new DateTime(2026, 3, 24, 10, 0, 0),
            EndTime = new DateTime(2026, 3, 24, 11, 0, 0)
        }
    };

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

## Important Notes

- Templates cannot override `height`, `width`, `top`, `left`, `right`, and `display` CSS properties
- Use `EventRendered` for dynamic styles based on data
- Use `Template` for custom HTML structure
- Combine both for maximum customization
- Always consider accessibility when customizing colors
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