RadzenScheduler<TItem> Class

A scheduler component for displaying and managing calendar appointments in multiple view types (day, week, month, year). RadzenScheduler provides a rich calendar interface with drag-and-drop, inline editing, recurring events, and customizable views. Displays time-based events in various calendar views, ideal for appointment booking, event calendars, resource scheduling, or any time-based data visualization. Features multiple views (Day, Week, Month, Year Planner, Year Timeline), drag & drop to move appointments between time slots, resize to adjust appointment duration by dragging edges, inline editing to create and edit appointments directly in the calendar, tooltips for quick info on hover, customizable appointment templates, support for all-day and multi-day events, and timezone-aware appointments. Define data properties using StartProperty, EndProperty, and TextProperty. Add view components (RadzenDayView, RadzenWeekView, RadzenMonthView) as child content.

Inheritance

Object

ComponentBase

RadzenComponent

RadzenScheduler<TItem>

Implements

IComponent

IHandleEvent

IHandleAfterRender

IScheduler

Namespace: Radzen.Blazor

Assembly: Radzen.Blazor.dll

Syntax

public class RadzenScheduler<TItem> : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender, IScheduler

Type Parameters

Name Description
TItemThe type of appointment data items. Must have DateTime properties for start/end times and a string property for text.

Examples

Basic scheduler with month view:

<RadzenScheduler Data=@appointments TItem="Appointment" StartProperty="Start" EndProperty="End" TextProperty="Title">
    <RadzenMonthView />
    <RadzenWeekView />
    <RadzenDayView />
</RadzenScheduler>
@code {
    class Appointment
    {
        public DateTime Start { get; set; }
        public DateTime End { get; set; }
        public string Title { get; set; }
    }
    List<Appointment> appointments = new();
}

Scheduler with editing and custom template:

<RadzenScheduler Data=@appointments TItem="Appointment" 
                 StartProperty="Start" EndProperty="End" TextProperty="Title"
                 SlotSelect=@OnSlotSelect AppointmentSelect=@OnAppointmentSelect>
    <Template Context="appointment">
        <strong>@appointment.Title</strong>
        <div>@appointment.Description</div>
    </Template>
    <RadzenWeekView />
</RadzenScheduler>

Constructors

RadzenScheduler<TItem>link

A scheduler component for displaying and managing calendar appointments in multiple view types (day, week, month, year). RadzenScheduler provides a rich calendar interface with drag-and-drop, inline editing, recurring events, and customizable views. Displays time-based events in various calendar views, ideal for appointment booking, event calendars, resource scheduling, or any time-based data visualization. Features multiple views (Day, Week, Month, Year Planner, Year Timeline), drag & drop to move appointments between time slots, resize to adjust appointment duration by dragging edges, inline editing to create and edit appointments directly in the calendar, tooltips for quick info on hover, customizable appointment templates, support for all-day and multi-day events, and timezone-aware appointments. Define data properties using StartProperty, EndProperty, and TextProperty. Add view components (RadzenDayView, RadzenWeekView, RadzenMonthView) as child content.

Declaration
public RadzenScheduler<TItem>()

Properties

AppointmentMouseEnterlink

A callback that will be invoked when the user moves the mouse over an appointment in the current view.

Declaration
public EventCallback<SchedulerAppointmentMouseEventArgs<TItem>> AppointmentMouseEnter { get; set; }
Property Value
Type Description
EventCallback<SchedulerAppointmentMouseEventArgs<TItem>>A callback that will be invoked when the user moves the mouse over an appointment in the current view.

AppointmentMouseLeavelink

A callback that will be invoked when the user moves the mouse out of an appointment in the current view.

Declaration
public EventCallback<SchedulerAppointmentMouseEventArgs<TItem>> AppointmentMouseLeave { get; set; }
Property Value
Type Description
EventCallback<SchedulerAppointmentMouseEventArgs<TItem>>A callback that will be invoked when the user moves the mouse out of an appointment in the current view.

AppointmentMovelink

A callback that will be invoked when an appointment is being dragged and then dropped on a different slot. Commonly used to change it to a different timeslot.

Declaration
public EventCallback<SchedulerAppointmentMoveEventArgs> AppointmentMove { get; set; }
Property Value
Type Description
EventCallback<SchedulerAppointmentMoveEventArgs>A callback that will be invoked when an appointment is being dragged and then dropped on a different slot. Commonly used to change it to a different timeslot.
Examples
<RadzenScheduler Data=@appointments AppointmentMove=@OnAppointmentMove>
</RadzenScheduler>
@code {
  async Task OnAppointmentMove(SchedulerAppointmentMoveEventArgs moved)
  {
    var draggedAppointment = appointments.SingleOrDefault(x => x == (Appointment)moved.Appointment.Data);
    if (draggedAppointment != null)
    {
        draggedAppointment.Start = draggedAppointment.Start + moved.TimeSpan;
        draggedAppointment.End = draggedAppointment.End + moved.TimeSpan;
        await scheduler.Reload();
    }
  }
}

AppointmentRenderlink

An action that will be invoked when the current view renders an appointment. Never call StateHasChanged when handling AppointmentRender.

Declaration
public Action<SchedulerAppointmentRenderEventArgs<TItem>> AppointmentRender { get; set; }
Property Value
Type Description
Action<SchedulerAppointmentRenderEventArgs<TItem>>An action that will be invoked when the current view renders an appointment. Never call StateHasChanged when handling AppointmentRender.
Examples
 <RadzenScheduler Data=@appointments AppointmentRender=@OnAppointmentRendert>
 </RadzenScheduler>
 @code {
   void OnAppintmentRender(SchedulerAppointmentRenderEventArgs<TItem> args)
   {
     if (args.Data.Text == "Birthday")
     {
        args.Attributes["style"] = "color: red;"
     }
.  }
 }

AppointmentSelectlink

A callback that will be invoked when the user clicks an appointment in the current view. Commonly used to edit existing appointments.

Declaration
public EventCallback<SchedulerAppointmentSelectEventArgs<TItem>> AppointmentSelect { get; set; }
Property Value
Type Description
EventCallback<SchedulerAppointmentSelectEventArgs<TItem>>A callback that will be invoked when the user clicks an appointment in the current view. Commonly used to edit existing appointments.
Examples
<RadzenScheduler Data=@appointments AppointmentSelect=@OnAppointmentSelect>
</RadzenScheduler>
@code {
 void OnAppointmentSelect(SchedulerAppointmentSelectEventArgs<TItem> args)
 {
 }
}

ChildContentlink

Gets or sets the child content of the scheduler. Use to specify what views to render.

Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type Description
RenderFragmentGets or sets the child content of the scheduler. Use to specify what views to render.

CurrentDatelink

Gets or sets the current date displayed by the selected view. Initially set to Date. Changes during navigation.

Declaration
public DateTime CurrentDate { get; set; }
Property Value
Type Description
DateTimeGets or sets the current date displayed by the selected view. Initially set to Date. Changes during navigation.

Datalink

Gets or sets the data of RadzenScheduler. It will display an appointment for every item of the collection which is within the current view date range.

Declaration
public IEnumerable<TItem> Data { get; set; }
Property Value
Type Description
IEnumerable<TItem>Gets or sets the data of RadzenScheduler. It will display an appointment for every item of the collection which is within the current view date range.

Datelink

Gets or sets the initial date displayed by the selected view. Set to DateTime.Today by default.

Declaration
public DateTime Date { get; set; }
Property Value
Type Description
DateTimeGets or sets the initial date displayed by the selected view. Set to DateTime.Today by default.

DaySelectlink

A callback that will be invoked when the user clicks a day header button or the day number in a MonthView.

Declaration
public EventCallback<SchedulerDaySelectEventArgs> DaySelect { get; set; }
Property Value
Type Description
EventCallback<SchedulerDaySelectEventArgs>A callback that will be invoked when the user clicks a day header button or the day number in a MonthView.
Examples
<RadzenScheduler Data=@appointments DaySelect=@OnDaySelect>
</RadzenScheduler>
@code {
void OnDaySelect(SchedulerDaySelectEventArgs args)
{
    var selectedDay = args.Day;
}
}

EndPropertylink

Specifies the property of TItem which will set End.

Declaration
public string EndProperty { get; set; }
Property Value
Type Description
stringSpecifies the property of TItem which will set End.

LoadDatalink

A callback that will be invoked when the scheduler needs data for the current view. Commonly used to filter the data assigned to Data.

Declaration
public EventCallback<SchedulerLoadDataEventArgs> LoadData { get; set; }
Property Value
Type Description
EventCallback<SchedulerLoadDataEventArgs>A callback that will be invoked when the scheduler needs data for the current view. Commonly used to filter the data assigned to Data.

MonthSelectlink

A callback that will be invoked when the user clicks a month header button.

Declaration
public EventCallback<SchedulerMonthSelectEventArgs> MonthSelect { get; set; }
Property Value
Type Description
EventCallback<SchedulerMonthSelectEventArgs>A callback that will be invoked when the user clicks a month header button.
Examples
<RadzenScheduler Data=@appointments MonthSelect=@OnMonthSelect>
</RadzenScheduler>
@code {
void OnMonthSelect(SchedulerMonthSelectEventArgs args)
{
    var selectedMonth = args.MonthStart.Month;
}
}

MoreSelectlink

A callback that will be invoked when the user clicks the more text in the current view. Commonly used to view additional appointments. Invoke the PreventDefault method to prevent the default action (showing the additional appointments).

Declaration
public EventCallback<SchedulerMoreSelectEventArgs> MoreSelect { get; set; }
Property Value
Type Description
EventCallback<SchedulerMoreSelectEventArgs>A callback that will be invoked when the user clicks the more text in the current view. Commonly used to view additional appointments. Invoke the PreventDefault method to prevent the default action (showing the additional appointments).
Examples
<RadzenScheduler Data=@appointments MoreSelect=@OnMoreSelect>
</RadzenScheduler>
@code {
 void OnMoreSelect(SchedulerMoreSelectEventArgs args)
 {
    args.PreventDefault();
 }
}

NavigationTemplatelink

Gets or sets the additional content to be rendered in place of the default navigation buttons in the scheduler. This property allows for complete customization of the navigation controls, replacing the native date navigation buttons (such as year, month, and day) with user-defined content or buttons. Use this to add custom controls or interactive elements that better suit your application's requirements. This requires that the ShowHeader parameter to be set to true (enabled by default).

Declaration
public RenderFragment NavigationTemplate { get; set; }
Property Value
Type Description
RenderFragmentGets or sets the additional content to be rendered in place of the default navigation buttons in the scheduler. This property allows for complete customization of the navigation controls, replacing the native date navigation buttons (such as year, month, and day) with user-defined content or buttons. Use this to add custom controls or interactive elements that better suit your application's requirements. This requires that the ShowHeader parameter to be set to true (enabled by default).

NextTextlink

Gets or sets the text of the next button. Set to Next by default.

Declaration
public string NextText { get; set; }
Property Value
Type Description
stringGets or sets the text of the next button. Set to Next by default.

PrevTextlink

Gets or sets the text of the previous button. Set to Previous by default.

Declaration
public string PrevText { get; set; }
Property Value
Type Description
stringGets or sets the text of the previous button. Set to Previous by default.

SelectedIndexlink

Specifies the initially selected view.

Declaration
public int SelectedIndex { get; set; }
Property Value
Type Description
intSpecifies the initially selected view.

SelectedViewlink

Gets the SelectedView.

Declaration
public ISchedulerView SelectedView { get; }
Property Value
Type Description
ISchedulerViewGets the SelectedView.

ShowHeaderlink

Specifies whether to Show or Hide the Scheduler Header. Defaults to true />.

Declaration
public bool ShowHeader { get; set; }
Property Value
Type Description
boolSpecifies whether to Show or Hide the Scheduler Header. Defaults to true />.

SlotRenderlink

An action that will be invoked when the current view renders an slot. Never call StateHasChanged when handling SlotRender.

Declaration
public Action<SchedulerSlotRenderEventArgs> SlotRender { get; set; }
Property Value
Type Description
Action<SchedulerSlotRenderEventArgs>An action that will be invoked when the current view renders an slot. Never call StateHasChanged when handling SlotRender.
Examples
<RadzenScheduler Data=@appointments SlotRender=@OnSlotRender>
</RadzenScheduler>
@code {
  void OnSlotRender(SchedulerSlotRenderEventArgs args)
  {
    if (args.View.Text == "Month" && args.Start.Date == DateTime.Today)
    {
       args.Attributes["style"] = "background: red;";
    }
  }
}

SlotSelectlink

A callback that will be invoked when the user clicks a slot in the current view. Commonly used to add new appointments.

Declaration
public EventCallback<SchedulerSlotSelectEventArgs> SlotSelect { get; set; }
Property Value
Type Description
EventCallback<SchedulerSlotSelectEventArgs>A callback that will be invoked when the user clicks a slot in the current view. Commonly used to add new appointments.
Examples
<RadzenScheduler Data=@appointments SlotSelect=@OnSlotSelect>
</RadzenScheduler>
@code {
 void OnSlotSelect(SchedulerSlotSelectEventArgs args)
 {
 }
}

StartPropertylink

Specifies the property of TItem which will set Start.

Declaration
public string StartProperty { get; set; }
Property Value
Type Description
stringSpecifies the property of TItem which will set Start.

Templatelink

Gets or sets the template used to render appointments.

Declaration
public RenderFragment<TItem> Template { get; set; }
Property Value
Type Description
RenderFragment<TItem>Gets or sets the template used to render appointments.
Examples
<RadzenScheduler Data="@data" TItem="DataItem" StartProperty="Start" EndProperty="End" TextProperty="Text">
   <Template Context="data">
      <strong>@data.Text</strong>
   </Template>
   <ChildContent>
      <RadzenMonthView />
    </ChildContent>
</RadzenScheduler>

TextPropertylink

Specifies the property of TItem which will set Text.

Declaration
public string TextProperty { get; set; }
Property Value
Type Description
stringSpecifies the property of TItem which will set Text.

TodaySelectlink

A callback that will be invoked when the user clicks the Today button.

Declaration
public EventCallback<SchedulerTodaySelectEventArgs> TodaySelect { get; set; }
Property Value
Type Description
EventCallback<SchedulerTodaySelectEventArgs>A callback that will be invoked when the user clicks the Today button.
Examples
<RadzenScheduler Data=@appointments TodaySelect=@OnTodaySelect>
</RadzenScheduler>
@code {
void OnTodaySelect(SchedulerTodaySelectEventArgs args)
{
    args.Today = DateTime.Today.AddDays(1);
}
}

TodayTextlink

Gets or sets the text of the today button. Set to Today by default.

Declaration
public string TodayText { get; set; }
Property Value
Type Description
stringGets or sets the text of the today button. Set to Today by default.

Methods

AddViewlink

Declaration
public Task AddView(ISchedulerView view)
Parameters
Type Name Description
ISchedulerView view
Returns
Type Description
Task

BuildRenderTreelink

Declaration
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
Parameters
Type Name Description
Rendering.RenderTreeBuilder __builder

Disposelink

Declaration
public override void Dispose()

GetAppointmentAttributeslink

Declaration
public IDictionary<string, object> GetAppointmentAttributes(AppointmentData item)
Parameters
Type Name Description
AppointmentData item
Returns
Type Description
IDictionary<string, object>

GetAppointmentsInRangelink

Declaration
public IEnumerable<AppointmentData> GetAppointmentsInRange(DateTime start, DateTime end)
Parameters
Type Name Description
DateTime start
DateTime end
Returns
Type Description
IEnumerable<AppointmentData>

GetComponentCssClasslink

Declaration
protected override string GetComponentCssClass()
Returns
Type Description
string

GetSlotAttributeslink

Declaration
public IDictionary<string, object> GetSlotAttributes(DateTime start, DateTime end, Func<IEnumerable<AppointmentData>> getAppointments)
Parameters
Type Name Description
DateTime start
DateTime end
Func<IEnumerable<AppointmentData>> getAppointments
Returns
Type Description
IDictionary<string, object>

IsAppointmentInRangelink

Declaration
public bool IsAppointmentInRange(AppointmentData item, DateTime start, DateTime end)
Parameters
Type Name Description
AppointmentData item
DateTime start
DateTime end
Returns
Type Description
bool

IsSelectedlink

Declaration
public bool IsSelected(ISchedulerView view)
Parameters
Type Name Description
ISchedulerView view
Returns
Type Description
bool

OnAfterRenderAsynclink

Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type Name Description
bool firstRender
Returns
Type Description
Task

OnInitializedlink

Declaration
protected override void OnInitialized()

Reloadlink

Causes the current scheduler view to render. Enumerates the items of Data and creates instances of AppointmentData to display in the current view. Use it when Data has changed.

Declaration
public Task Reload()
Returns
Type Description
Task

RemoveViewlink

Declaration
public void RemoveView(ISchedulerView view)
Parameters
Type Name Description
ISchedulerView view

RenderAppointmentlink

Declaration
public RenderFragment RenderAppointment(AppointmentData item)
Parameters
Type Name Description
AppointmentData item
Returns
Type Description
RenderFragment

Resizelink

Invoked from client-side via interop when the scheduler size changes.

Declaration
public void Resize(double width, double height)
Parameters
Type Name Description
double width The width.
double height The height.

SelectAppointmentlink

Declaration
public Task SelectAppointment(AppointmentData data)
Parameters
Type Name Description
AppointmentData data
Returns
Type Description
Task

SelectDaylink

Declaration
public Task SelectDay(DateTime day, IEnumerable<AppointmentData> appointments)
Parameters
Type Name Description
DateTime day
IEnumerable<AppointmentData> appointments
Returns
Type Description
Task

SelectMonthlink

Declaration
public Task SelectMonth(DateTime monthStart, IEnumerable<AppointmentData> appointments)
Parameters
Type Name Description
DateTime monthStart
IEnumerable<AppointmentData> appointments
Returns
Type Description
Task

SelectMorelink

Declaration
public Task<bool> SelectMore(DateTime start, DateTime end, IEnumerable<AppointmentData> appointments)
Parameters
Type Name Description
DateTime start
DateTime end
IEnumerable<AppointmentData> appointments
Returns
Type Description
Task<bool>

SelectSlotlink

Declaration
public Task SelectSlot(DateTime start, DateTime end)
Parameters
Type Name Description
DateTime start
DateTime end
Returns
Type Description
Task

SelectSlotlink

Declaration
public Task<bool> SelectSlot(DateTime start, DateTime end, IEnumerable<AppointmentData> appointments)
Parameters
Type Name Description
DateTime start
DateTime end
IEnumerable<AppointmentData> appointments
Returns
Type Description
Task<bool>

SelectViewlink

Selects the specified ISchedulerView. The view must already be present in this scheduler. If the specified view is already selected, no action will be performed.

Declaration
public Task SelectView(ISchedulerView view)
Parameters
Type Name Description
ISchedulerView view The ISchedulerView to select
Returns
Type Description
Task

SetParametersAsynclink

Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
Type Name Description
ParameterView parameters
Returns
Type Description
Task
An error has occurred. This app may no longer respond until reloaded. Reload 🗙