Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfCalendar<TValue>

    Show / Hide Table of Contents

    Class SfCalendar<TValue>

    The Calendar is a graphical user interface component that displays a Gregorian Calendar, and allows a user to select a date.

    Inheritance
    System.Object
    SfBaseComponent
    SfInputTextBase<TValue>
    CalendarBase<TValue>
    SfCalendar<TValue>
    Inherited Members
    Syncfusion.Blazor.Calendars.CalendarBase<TValue>.SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView)
    CalendarBase<TValue>.CalendarEditContext
    CalendarBase<TValue>.Max
    CalendarBase<TValue>.Min
    CalendarBase<TValue>.FirstDayOfWeek
    CalendarBase<TValue>.CalendarMode
    CalendarBase<TValue>.DayHeaderFormat
    CalendarBase<TValue>.Depth
    CalendarBase<TValue>.KeyConfigs
    CalendarBase<TValue>.Start
    CalendarBase<TValue>.ServerTimezoneOffset
    CalendarBase<TValue>.ShowTodayButton
    CalendarBase<TValue>.WeekNumber
    CalendarBase<TValue>.WeekRule
    SfInputTextBase<TValue>.CONTROL_CONTAINER
    SfInputTextBase<TValue>.CONTROL_OLD_CONTAINER
    SfInputTextBase<TValue>.INPUTGROUP
    SfInputTextBase<TValue>.CLEARICONHIDE
    SfInputTextBase<TValue>.MULTILINE
    SfInputTextBase<TValue>.DISABLE
    SfInputTextBase<TValue>.INPUT
    SfInputTextBase<TValue>.INPUTFOCUS
    SfInputTextBase<TValue>.FLOATINPUT
    SfInputTextBase<TValue>.FLOATTEXT
    SfInputTextBase<TValue>.FLOATLABELBOTTOM
    SfInputTextBase<TValue>.FLOATLABELTOP
    SfInputTextBase<TValue>.INCREMENT_TITLE
    SfInputTextBase<TValue>.DECREMENT_TITLE
    SfInputTextBase<TValue>.INCREMENT
    SfInputTextBase<TValue>.DECREMENT
    SfInputTextBase<TValue>.DISABLED_ATTR
    SfInputTextBase<TValue>.ARIA_DISABLED
    SfInputTextBase<TValue>.APPEND
    SfInputTextBase<TValue>.PREPEND
    SfInputTextBase<TValue>.CLEAR_ICON_HIDE
    SfInputTextBase<TValue>.GROUP_ICON
    SfInputTextBase<TValue>.SPACE
    SfInputTextBase<TValue>.SPIN_DOWN
    SfInputTextBase<TValue>.SPIN_UP
    SfInputTextBase<TValue>.DISABLE_ICON
    SfInputTextBase<TValue>.FormatValueAsString(TValue)
    SfInputTextBase<TValue>.FormatValue(String)
    SfInputTextBase<TValue>.InputHandler(ChangeEventArgs)
    SfInputTextBase<TValue>.OnInputHandler(ChangeEventArgs)
    SfInputTextBase<TValue>.OnPasteHandler(ClipboardEventArgs)
    SfInputTextBase<TValue>.FocusHandler(FocusEventArgs)
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.BlurHandler()
    SfInputTextBase<TValue>.FocusOutHandler(FocusEventArgs)
    SfInputTextBase<TValue>.ChangeHandler(ChangeEventArgs)
    SfInputTextBase<TValue>.OnChangeHandler(ChangeEventArgs)
    SfInputTextBase<TValue>.WireClearBtnEvents()
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.OnChange
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.OnInput
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.OnPaste
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.OnBlur
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.OnFocus
    SfInputTextBase<TValue>.ID
    SfInputTextBase<TValue>.Value
    SfInputTextBase<TValue>._value
    SfInputTextBase<TValue>.ValueChanged
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.ValueExpression
    SfInputTextBase<TValue>.InputEditContext
    SfInputTextBase<TValue>.CssClass
    SfInputTextBase<TValue>.EnablePersistence
    SfInputTextBase<TValue>.EnableRtl
    SfInputTextBase<TValue>.Enabled
    SfInputTextBase<TValue>.BaseFloatLabelType
    SfInputTextBase<TValue>.BaseHtmlAttributes
    SfInputTextBase<TValue>.BaseInputAttributes
    SfInputTextBase<TValue>.ValidateOnInput
    SfInputTextBase<TValue>.MultilineInput
    SfInputTextBase<TValue>.BasePlaceholder
    SfInputTextBase<TValue>.BaseReadonly
    SfInputTextBase<TValue>.BaseIsReadOnlyInput
    SfInputTextBase<TValue>.BaseShowClearButton
    SfInputTextBase<TValue>.BaseWidth
    SfInputTextBase<TValue>.BaseTabIndex
    SfInputTextBase<TValue>.BaseAutocomplete
    SfInputTextBase<TValue>.ContainerAttr
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.SpinButton
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.ValueTemplate
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.IsValueTemplate
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.ClickStopPropagation
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.MouseDowSpinnerPrevent
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.PreventIconHandler
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.MousePreventContainer
    SfInputTextBase<TValue>.ListOfButtons
    SfInputTextBase<TValue>.DataId
    SfInputTextBase<TValue>.inputAttr
    SfInputTextBase<TValue>.containerAttributes
    SfInputTextBase<TValue>.FloatLabel
    SfInputTextBase<TValue>.ClearElement
    SfInputTextBase<TValue>.IsFocused
    SfInputTextBase<TValue>.IncrementTitle
    SfInputTextBase<TValue>.DecrementTitle
    SfInputTextBase<TValue>.IsClearButtonClicked
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.ContainerClass
    SfBaseComponent.Dispose()
    SfBaseComponent.Dispose(Boolean)
    SfBaseComponent.OnObservableChange(String, Object, Boolean, NotifyCollectionChangedEventArgs)
    Namespace: Syncfusion.Blazor.Calendars
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SfCalendar<TValue> : CalendarBase<TValue>
    Type Parameters
    Name Description
    TValue

    Constructors

    SfCalendar()

    Declaration
    public SfCalendar()

    Properties

    ChildContent

    Specifies the content that has to be passed.

    Declaration
    public RenderFragment ChildContent { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment

    Accepts a RenderFragment that defines the content of the UI element.

    ComponentReference

    Declaration
    protected override string ComponentReference { get; set; }
    Property Value
    Type Description
    System.String
    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.ComponentReference

    HtmlAttributes

    You can add the additional html attributes such as styles, class etc., to the root element.

    If you configured both property and equivalent html attribute, then the component considers the property value.

    Declaration
    public Dictionary<string, object> HtmlAttributes { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.Object>

    IsMultiSelection

    Specifies the boolean value whether the calendar allows the user to select the multiple dates.

    Declaration
    public bool IsMultiSelection { get; set; }
    Property Value
    Type Description
    System.Boolean

    true, If the multiple selection can be enabled. The default value is false.

    RootClass

    Declaration
    protected override string RootClass { get; set; }
    Property Value
    Type Description
    System.String
    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.RootClass

    TabIndex

    Specifies the tab order of the component.

    Declaration
    public int TabIndex { get; set; }
    Property Value
    Type Description
    System.Int32

    Accepts an integer value.

    Values

    Sets multiple selected dates of the calendar.

    Declaration
    public DateTime[] Values { get; set; }
    Property Value
    Type Description
    System.DateTime[]

    An array of DateTime values representing the selected dates.

    ValuesChanged

    Specifies the callback to trigger when the values changes.

    Declaration
    public EventCallback<DateTime[]> ValuesChanged { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.DateTime[]>

    ValuesExpression

    Specifies the expression for defining the values of the bound.

    Declaration
    public Expression<Func<DateTime[]>> ValuesExpression { get; set; }
    Property Value
    Type Description
    System.Linq.Expressions.Expression<System.Func<System.DateTime[]>>

    The expression for defining the values of the bound, represented as a lambda expression of type

    Expression<Func<DateTime[]>>
    .

    Methods

    AddDatesAsync(DateTime[])

    To adds the single or multiple dates to the Values property of the calendar.

    Declaration
    public Task AddDatesAsync(DateTime[] dates = null)
    Parameters
    Type Name Description
    System.DateTime[] dates

    Specifies the dates to be added to the Values property of the Calendar.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    BuildRenderTree(RenderTreeBuilder)

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

    ChangeEvent(EventArgs)

    Triggers when calendar value is changed.

    Declaration
    protected override void ChangeEvent(EventArgs args)
    Parameters
    Type Name Description
    System.EventArgs args

    Specifies the event arguments.

    Overrides
    Syncfusion.Blazor.Calendars.CalendarBase<TValue>.ChangeEvent(System.EventArgs)

    CurrentView()

    Gets the current view of the Calendar.

    Declaration
    public string CurrentView()
    Returns
    Type Description
    System.String

    Current view of the calendar.

    GetPersistDataAsync()

    Gets the properties to be maintained upon browser refresh.

    Declaration
    public Task<string> GetPersistDataAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.String>

    Task.

    NavigateAsync(CalendarView, TValue)

    To navigate to the month or year or decade view of the calendar.

    Declaration
    public Task NavigateAsync(CalendarView view, TValue date)
    Parameters
    Type Name Description
    CalendarView view

    Specifies the view of the calendar.

    TValue date

    Specifies the focused date in a view.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    OnAfterRenderAsync(Boolean)

    Triggers after the component is rendered.

    Declaration
    protected override Task OnAfterRenderAsync(bool firstRender)
    Parameters
    Type Name Description
    System.Boolean firstRender

    True if the component is rendered for the first time.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.OnAfterRenderAsync(System.Boolean)

    OnInitializedAsync()

    Triggers while initial rendering of the component.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.OnInitializedAsync()

    OnParametersSetAsync()

    Triggers while dynamically changing the properties of the component.

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Task.

    Overrides
    Syncfusion.Blazor.Inputs.SfInputTextBase<TValue>.OnParametersSetAsync()

    RemoveDatesAsync(DateTime[])

    To removes the single or multiple dates from the Values property of the calendar.

    Specifies the dates which need to be removed from the values property of the Calendar.
    Declaration
    public Task RemoveDatesAsync(DateTime[] dates = null)
    Parameters
    Type Name Description
    System.DateTime[] dates
    Returns
    Type Description
    System.Threading.Tasks.Task
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved