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.
RadzenComponent.RaiseContextMenu
RadzenComponent.RaiseMouseEnter
RadzenComponent.AddContextMenu
RadzenComponent.RaiseMouseLeave
RadzenComponent.OnBecameInvisible
RadzenComponent.DefaultCulture
RadzenComponent.IsJSRuntimeAvailable
ComponentBase.OnInitializedAsync
ComponentBase.OnParametersSet
ComponentBase.OnParametersSetAsync
ComponentBase.StateHasChanged
ComponentBase.ShouldRender
ComponentBase.OnAfterRender
ComponentBase.InvokeAsync
ComponentBase.DispatchExceptionAsync
ComponentBase.RendererInfo
ComponentBase.Assets
ComponentBase.AssignedRenderMode
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
public class RadzenScheduler<TItem> : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender, IScheduler| Name | Description |
|---|---|
| TItem | The type of appointment data items. Must have DateTime properties for start/end times and a string property for text. |
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>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.
public RadzenScheduler<TItem>()A callback that will be invoked when the user moves the mouse over an appointment in the current view.
public EventCallback<SchedulerAppointmentMouseEventArgs<TItem>> AppointmentMouseEnter { get; set; }
| Type | Description |
|---|---|
| EventCallback<SchedulerAppointmentMouseEventArgs<TItem>> | A callback that will be invoked when the user moves the mouse over an appointment in the current view. |
A callback that will be invoked when the user moves the mouse out of an appointment in the current view.
public EventCallback<SchedulerAppointmentMouseEventArgs<TItem>> AppointmentMouseLeave { get; set; }
| 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. |
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.
public EventCallback<SchedulerAppointmentMoveEventArgs> AppointmentMove { get; set; }
| 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. |
<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();
}
}
}An action that will be invoked when the current view renders an appointment. Never call StateHasChanged when handling AppointmentRender.
public Action<SchedulerAppointmentRenderEventArgs<TItem>> AppointmentRender { get; set; }
| Type | Description |
|---|---|
| Action<SchedulerAppointmentRenderEventArgs<TItem>> | An action that will be invoked when the current view renders an appointment. Never call StateHasChanged when handling AppointmentRender. |
<RadzenScheduler Data=@appointments AppointmentRender=@OnAppointmentRendert>
</RadzenScheduler>
@code {
void OnAppintmentRender(SchedulerAppointmentRenderEventArgs<TItem> args)
{
if (args.Data.Text == "Birthday")
{
args.Attributes["style"] = "color: red;"
}
. }
}A callback that will be invoked when the user clicks an appointment in the current view. Commonly used to edit existing appointments.
public EventCallback<SchedulerAppointmentSelectEventArgs<TItem>> AppointmentSelect { get; set; }
| 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. |
<RadzenScheduler Data=@appointments AppointmentSelect=@OnAppointmentSelect>
</RadzenScheduler>
@code {
void OnAppointmentSelect(SchedulerAppointmentSelectEventArgs<TItem> args)
{
}
}Gets or sets the child content of the scheduler. Use to specify what views to render.
public RenderFragment ChildContent { get; set; }
| Type | Description |
|---|---|
| RenderFragment | Gets or sets the child content of the scheduler. Use to specify what views to render. |
Gets or sets the current date displayed by the selected view. Initially set to Date. Changes during navigation.
public DateTime CurrentDate { get; set; }
| Type | Description |
|---|---|
| DateTime | Gets or sets the current date displayed by the selected view. Initially set to Date. Changes during navigation. |
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.
public IEnumerable<TItem> Data { get; set; }
| 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. |
Gets or sets the initial date displayed by the selected view. Set to DateTime.Today by default.
public DateTime Date { get; set; }
| Type | Description |
|---|---|
| DateTime | Gets or sets the initial date displayed by the selected view. Set to DateTime.Today by default. |
A callback that will be invoked when the user clicks a day header button or the day number in a MonthView.
public EventCallback<SchedulerDaySelectEventArgs> DaySelect { get; set; }
| 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. |
<RadzenScheduler Data=@appointments DaySelect=@OnDaySelect>
</RadzenScheduler>
@code {
void OnDaySelect(SchedulerDaySelectEventArgs args)
{
var selectedDay = args.Day;
}
}Specifies the property of TItem which will set End.
public string EndProperty { get; set; }
| Type | Description |
|---|---|
| string | Specifies the property of TItem which will set End. |
A callback that will be invoked when the scheduler needs data for the current view. Commonly used to filter the data assigned to Data.
public EventCallback<SchedulerLoadDataEventArgs> LoadData { get; set; }
| 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. |
A callback that will be invoked when the user clicks a month header button.
public EventCallback<SchedulerMonthSelectEventArgs> MonthSelect { get; set; }
| Type | Description |
|---|---|
| EventCallback<SchedulerMonthSelectEventArgs> | A callback that will be invoked when the user clicks a month header button. |
<RadzenScheduler Data=@appointments MonthSelect=@OnMonthSelect>
</RadzenScheduler>
@code {
void OnMonthSelect(SchedulerMonthSelectEventArgs args)
{
var selectedMonth = args.MonthStart.Month;
}
}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).
public EventCallback<SchedulerMoreSelectEventArgs> MoreSelect { get; set; }
| 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). |
<RadzenScheduler Data=@appointments MoreSelect=@OnMoreSelect>
</RadzenScheduler>
@code {
void OnMoreSelect(SchedulerMoreSelectEventArgs args)
{
args.PreventDefault();
}
}Gets or sets the text of the next button. Set to Next by default.
public string NextText { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the text of the next button. Set to Next by default. |
Gets or sets the text of the previous button. Set to Previous by default.
public string PrevText { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the text of the previous button. Set to Previous by default. |
Specifies the initially selected view.
public int SelectedIndex { get; set; }
| Type | Description |
|---|---|
| int | Specifies the initially selected view. |
Gets the SelectedView.
public ISchedulerView SelectedView { get; }
| Type | Description |
|---|---|
| ISchedulerView | Gets the SelectedView. |
Specifies whether to Show or Hide the Scheduler Header. Defaults to true />.
public bool ShowHeader { get; set; }
| Type | Description |
|---|---|
| bool | Specifies whether to Show or Hide the Scheduler Header. Defaults to true />. |
An action that will be invoked when the current view renders an slot. Never call StateHasChanged when handling SlotRender.
public Action<SchedulerSlotRenderEventArgs> SlotRender { get; set; }
| Type | Description |
|---|---|
| Action<SchedulerSlotRenderEventArgs> | An action that will be invoked when the current view renders an slot. Never call StateHasChanged when handling SlotRender. |
<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;";
}
}
}A callback that will be invoked when the user clicks a slot in the current view. Commonly used to add new appointments.
public EventCallback<SchedulerSlotSelectEventArgs> SlotSelect { get; set; }
| 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. |
<RadzenScheduler Data=@appointments SlotSelect=@OnSlotSelect>
</RadzenScheduler>
@code {
void OnSlotSelect(SchedulerSlotSelectEventArgs args)
{
}
}Specifies the property of TItem which will set Start.
public string StartProperty { get; set; }
| Type | Description |
|---|---|
| string | Specifies the property of TItem which will set Start. |
Gets or sets the template used to render appointments.
public RenderFragment<TItem> Template { get; set; }
| Type | Description |
|---|---|
| RenderFragment<TItem> | Gets or sets the template used to render appointments. |
<RadzenScheduler Data="@data" TItem="DataItem" StartProperty="Start" EndProperty="End" TextProperty="Text">
<Template Context="data">
<strong>@data.Text</strong>
</Template>
<ChildContent>
<RadzenMonthView />
</ChildContent>
</RadzenScheduler>Specifies the property of TItem which will set Text.
public string TextProperty { get; set; }
| Type | Description |
|---|---|
| string | Specifies the property of TItem which will set Text. |
A callback that will be invoked when the user clicks the Today button.
public EventCallback<SchedulerTodaySelectEventArgs> TodaySelect { get; set; }
| Type | Description |
|---|---|
| EventCallback<SchedulerTodaySelectEventArgs> | A callback that will be invoked when the user clicks the Today button. |
<RadzenScheduler Data=@appointments TodaySelect=@OnTodaySelect>
</RadzenScheduler>
@code {
void OnTodaySelect(SchedulerTodaySelectEventArgs args)
{
args.Today = DateTime.Today.AddDays(1);
}
}Gets or sets the text of the today button. Set to Today by default.
public string TodayText { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the text of the today button. Set to Today by default. |
public Task AddView(ISchedulerView view)
| Type | Name | Description |
|---|---|---|
| ISchedulerView | view |
| Type | Description |
|---|---|
| Task |
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
| Type | Name | Description |
|---|---|---|
| Rendering.RenderTreeBuilder | __builder |
public IDictionary<string, object> GetAppointmentAttributes(AppointmentData item)
| Type | Name | Description |
|---|---|---|
| AppointmentData | item |
| Type | Description |
|---|---|
| IDictionary<string, object> |
public IEnumerable<AppointmentData> GetAppointmentsInRange(DateTime start, DateTime end)
| Type | Name | Description |
|---|---|---|
| DateTime | start | |
| DateTime | end |
| Type | Description |
|---|---|
| IEnumerable<AppointmentData> |
protected override string GetComponentCssClass()
| Type | Description |
|---|---|
| string |
public IDictionary<string, object> GetSlotAttributes(DateTime start, DateTime end, Func<IEnumerable<AppointmentData>> getAppointments)
| Type | Name | Description |
|---|---|---|
| DateTime | start | |
| DateTime | end | |
| Func<IEnumerable<AppointmentData>> | getAppointments |
| Type | Description |
|---|---|
| IDictionary<string, object> |
public bool IsAppointmentInRange(AppointmentData item, DateTime start, DateTime end)
| Type | Name | Description |
|---|---|---|
| AppointmentData | item | |
| DateTime | start | |
| DateTime | end |
| Type | Description |
|---|---|
| bool |
public bool IsSelected(ISchedulerView view)
| Type | Name | Description |
|---|---|---|
| ISchedulerView | view |
| Type | Description |
|---|---|
| bool |
protected override Task OnAfterRenderAsync(bool firstRender)
| Type | Name | Description |
|---|---|---|
| bool | firstRender |
| Type | Description |
|---|---|
| Task |
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.
public Task Reload()
| Type | Description |
|---|---|
| Task |
public void RemoveView(ISchedulerView view)
| Type | Name | Description |
|---|---|---|
| ISchedulerView | view |
public RenderFragment RenderAppointment(AppointmentData item)
| Type | Name | Description |
|---|---|---|
| AppointmentData | item |
| Type | Description |
|---|---|
| RenderFragment |
Invoked from client-side via interop when the scheduler size changes.
public void Resize(double width, double height)
| Type | Name | Description |
|---|---|---|
| double | width | The width. |
| double | height | The height. |
public Task SelectAppointment(AppointmentData data)
| Type | Name | Description |
|---|---|---|
| AppointmentData | data |
| Type | Description |
|---|---|
| Task |
public Task SelectDay(DateTime day, IEnumerable<AppointmentData> appointments)
| Type | Name | Description |
|---|---|---|
| DateTime | day | |
| IEnumerable<AppointmentData> | appointments |
| Type | Description |
|---|---|
| Task |
public Task SelectMonth(DateTime monthStart, IEnumerable<AppointmentData> appointments)
| Type | Name | Description |
|---|---|---|
| DateTime | monthStart | |
| IEnumerable<AppointmentData> | appointments |
| Type | Description |
|---|---|
| Task |
public Task<bool> SelectMore(DateTime start, DateTime end, IEnumerable<AppointmentData> appointments)
| Type | Name | Description |
|---|---|---|
| DateTime | start | |
| DateTime | end | |
| IEnumerable<AppointmentData> | appointments |
| Type | Description |
|---|---|
| Task<bool> |
public Task SelectSlot(DateTime start, DateTime end)
| Type | Name | Description |
|---|---|---|
| DateTime | start | |
| DateTime | end |
| Type | Description |
|---|---|
| Task |
public Task<bool> SelectSlot(DateTime start, DateTime end, IEnumerable<AppointmentData> appointments)
| Type | Name | Description |
|---|---|---|
| DateTime | start | |
| DateTime | end | |
| IEnumerable<AppointmentData> | appointments |
| Type | Description |
|---|---|
| Task<bool> |
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.
public Task SelectView(ISchedulerView view)
| Type | Name | Description |
|---|---|---|
| ISchedulerView | view | The ISchedulerView to select |
| Type | Description |
|---|---|
| Task |
public override Task SetParametersAsync(ParameterView parameters)
| Type | Name | Description |
|---|---|---|
| ParameterView | parameters |
| Type | Description |
|---|---|
| Task |