Class
TelerikCalendar

The Calendar component class.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

cs-api-definition
public class TelerikCalendar : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTelerikCalendar

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members BaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.Dispose()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnParametersSetAsync()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)

Constructors

TelerikCalendar()

Declaration

cs-api-definition
public TelerikCalendar()

Properties

AllowReverse

Defines if the end date can precede the start date.

Declaration

cs-api-definition
[Parameter]
public bool AllowReverse { get; set; }

Property Value

bool

BottomView

Defines the bottommost view to which the user can navigate. Default value is Month.

Declaration

cs-api-definition
[Parameter]
public CalendarView BottomView { get; set; }

Property Value

CalendarView

CenturyCellTemplate

The template that will be used when rendering date cells in Century View.

Declaration

cs-api-definition
[Parameter]
public RenderFragment<DateTime> CenturyCellTemplate { get; set; }

Property Value

RenderFragment<DateTime>

Date

Sets the date to which the calendar will navigate.

Declaration

cs-api-definition
[Parameter]
public DateTime Date { get; set; }

Property Value

DateTime

DateChanged

The handler that will be called when the user navigates to a different date.

Declaration

cs-api-definition
[Parameter]
public EventCallback<DateTime> DateChanged { get; set; }

Property Value

EventCallback<DateTime>

DecadeCellTemplate

The template that will be used when rendering date cells in Decade View.

Declaration

cs-api-definition
[Parameter]
public RenderFragment<DateTime> DecadeCellTemplate { get; set; }

Property Value

RenderFragment<DateTime>

DisabledDates

Specifies a list of dates that can not be selected.

Declaration

cs-api-definition
[Parameter]
public List<DateTime> DisabledDates { get; set; }

Property Value

List<DateTime>

HeaderTemplate

Specifies the header template.

Declaration

cs-api-definition
[Parameter]
public RenderFragment HeaderTemplate { get; set; }

Property Value

RenderFragment

Max

Sets the maximum allowed date of the calendar.

Declaration

cs-api-definition
[Parameter]
public DateTime Max { get; set; }

Property Value

DateTime

Min

Sets the minimum allowed date of the calendar.

Declaration

cs-api-definition
[Parameter]
public DateTime Min { get; set; }

Property Value

DateTime

MonthCellTemplate

The template that will be used when rendering date cells in Month View.

Declaration

cs-api-definition
[Parameter]
public RenderFragment<DateTime> MonthCellTemplate { get; set; }

Property Value

RenderFragment<DateTime>

OnCellRender

Called each time a cell is rendered. Use this to add custom classes to the cell based on the date.

Declaration

cs-api-definition
[Parameter]
public Action<CalendarCellRenderEventArgs> OnCellRender { get; set; }

Property Value

Action<CalendarCellRenderEventArgs>

Orientation

Specifies the orientation of the calendar when multiple views are present. The available vaues are Horizontal (default) and Vertical.

Declaration

cs-api-definition
[Parameter]
public CalendarOrientation Orientation { get; set; }

Property Value

CalendarOrientation

RangeEnd

The end selected date in CalendarSelectionMode.Range.

Declaration

cs-api-definition
[Parameter]
public DateTime RangeEnd { get; set; }

Property Value

DateTime

RangeEndChanged

The handler that will be called when range end changes.

Declaration

cs-api-definition
[Parameter]
public EventCallback<DateTime> RangeEndChanged { get; set; }

Property Value

EventCallback<DateTime>

RangeStart

The start selected date in CalendarSelectionMode.Range.

Declaration

cs-api-definition
[Parameter]
public DateTime RangeStart { get; set; }

Property Value

DateTime

RangeStartChanged

The handler that will be called when range start changes.

Declaration

cs-api-definition
[Parameter]
public EventCallback<DateTime> RangeStartChanged { get; set; }

Property Value

EventCallback<DateTime>

SelectedDates

Gets or sets the selected dates when multi-selection is enabled.

Declaration

cs-api-definition
[Parameter]
public List<DateTime> SelectedDates { get; set; }

Property Value

List<DateTime>

SelectionMode

Sets the selection mode of the calendar. Default value is Single.

Declaration

cs-api-definition
[Parameter]
public CalendarSelectionMode SelectionMode { get; set; }

Property Value

CalendarSelectionMode

ShowOtherMonthDays

Defines if the days from adjacent months are shown.

Declaration

cs-api-definition
[Parameter]
public bool ShowOtherMonthDays { get; set; }

Property Value

bool

ShowWeekNumbers

Defines if additional week number column is added.

Declaration

cs-api-definition
[Parameter]
public bool ShowWeekNumbers { get; set; }

Property Value

bool

Size

Specifies the Size of the calendar. Default value is Medium.

Declaration

cs-api-definition
[Parameter]
public string Size { get; set; }

Property Value

string

TopView

Defines the topmost view to which the user can navigate. Default value is Century.

Declaration

cs-api-definition
[Parameter]
public CalendarView TopView { get; set; }

Property Value

CalendarView

Value

Sets the value of the calendar when single selection is used.

Declaration

cs-api-definition
[Parameter]
public DateTime Value { get; set; }

Property Value

DateTime

ValueChanged

The handler that will be called when the user selects date(s).

Declaration

cs-api-definition
[Parameter]
public EventCallback<DateTime> ValueChanged { get; set; }

Property Value

EventCallback<DateTime>

View

Specifies the current view that will be displayed. See CalendarView.

Declaration

cs-api-definition
[Parameter]
public CalendarView View { get; set; }

Property Value

CalendarView

ViewChanged

The handler that will be called when the user navigates to a different view.

Declaration

cs-api-definition
[Parameter]
public EventCallback<CalendarView> ViewChanged { get; set; }

Property Value

EventCallback<CalendarView>

Views

Defines the number of views that will be rendered next to each other. Default value is 1.

Declaration

cs-api-definition
[Parameter]
public int Views { get; set; }

Property Value

int

YearCellTemplate

The template that will be used when rendering date cells in Year View.

Declaration

cs-api-definition
[Parameter]
public RenderFragment<DateTime> YearCellTemplate { get; set; }

Property Value

RenderFragment<DateTime>

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

NavigateTo(DateTime, CalendarView)

Moves the calendar to specific date in a view.

Declaration

cs-api-definition
public void NavigateTo(DateTime date, CalendarView view)

Parameters

date

DateTime

The date to which to navigate.

view

CalendarView

The view to which to navigate.

OnAfterRenderAsync(bool)

Declaration

cs-api-definition
protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender

bool

Returns

Task

Overrides BaseComponent.OnAfterRenderAsync(bool)

OnHeaderTitleClick()

Declaration

cs-api-definition
protected void OnHeaderTitleClick()

OnInitialized()

Declaration

cs-api-definition
protected override void OnInitialized()

Overrides ComponentBase.OnInitialized()

OnParametersSet()

Declaration

cs-api-definition
protected override void OnParametersSet()

Overrides ComponentBase.OnParametersSet()

Refresh()

Re-renders the component.

Declaration

cs-api-definition
public void Refresh()

SetParametersAsync(ParameterView)

Declaration

cs-api-definition
public override Task SetParametersAsync(ParameterView parameters)

Parameters

parameters

ParameterView

Returns

Task

Overrides ComponentBase.SetParametersAsync(ParameterView)