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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

Specifies the initially selected view.

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

SelectedViewLink to this section

Gets the SelectedView.

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

ShowDateTitleLink to this section

Gets or sets a value indicating whether the date title is visible. Set to true by default.

Declaration
public bool ShowDateTitle { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether the date title is visible. Set to true by default.

ShowHeaderLink to this section

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 />.

ShowNavigationButtonsLink to this section

Gets or sets a value indicating whether the previous and next navigation buttons are visible. Set to true by default.

Declaration
public bool ShowNavigationButtons { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether the previous and next navigation buttons are visible. Set to true by default.

ShowTodayButtonLink to this section

Gets or sets a value indicating whether the today button is visible. Set to true by default.

Declaration
public bool ShowTodayButton { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether the today button is visible. Set to true by default.

SlotRenderLink to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

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

BuildRenderTreeLink to this section

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

DisposeLink to this section

Declaration
public override void Dispose()

GetAppointmentAttributesLink to this section

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

GetAppointmentsInRangeLink to this section

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

GetComponentCssClassLink to this section

Declaration
protected override string GetComponentCssClass()
Returns
Type Description
string

GetSlotAttributesLink to this section

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 to this section

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 to this section

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

OnAfterRenderAsyncLink to this section

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

OnInitializedLink to this section

Declaration
protected override void OnInitialized()

ReloadLink to this section

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 to this section

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

RenderAppointmentLink to this section

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

ResizeLink to this section

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 to this section

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

SelectDayLink to this section

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

SelectMonthLink to this section

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

SelectMoreLink to this section

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 to this section

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

SelectSlotLink to this section

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 to this section

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 to this section

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 🗙