Class CalendarBase<T>
The Calendar is a graphical user interface component that displays a Gregorian Calendar, and allows a user to select a date.
Inheritance
Namespace: Syncfusion.Blazor.Calendars
Assembly: Syncfusion.Blazor.dll
Syntax
public class CalendarBase<T> : SfBaseComponent
Type Parameters
Name | Description |
---|---|
T |
Constructors
CalendarBase()
Declaration
public CalendarBase()
Properties
CalendarEditContext
Declaration
protected EditContext CalendarEditContext { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.Forms.EditContext |
CalendarMode
Sets the calendar's type like Gregorian.
Declaration
public CalendarType CalendarMode { get; set; }
Property Value
Type | Description |
---|---|
CalendarType |
DayHeaderFormat
Specifies the format of the day that to be displayed in the header. By default, the format is short.
Possible formats are:
- ShortSets the short format of day name (like Su ) in day header.
- NarrowSets the single character of day name (like S ) in day header.
- AbbreviatedSets the min format of day name (like Sun ) in day header.
- WideSets the long format of day name (like Sunday ) in day header.
Declaration
public DayHeaderFormats DayHeaderFormat { get; set; }
Property Value
Type | Description |
---|---|
DayHeaderFormats |
Depth
Sets the maximum level of views such as a month, year, and decade in the calendar.
The depth view should be smaller than the start view to restrict its view navigation.
Declaration
public CalendarView Depth { get; set; }
Property Value
Type | Description |
---|---|
CalendarView |
EnablePersistence
Enable or disable persisting component's state between page reloads. If enabled, the following list of states will be persisted.
Declaration
public bool EnablePersistence { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
FirstDayOfWeek
Sets the calendar's first day of the week. By default, the first day of the week will be based on the current culture.
Declaration
public int FirstDayOfWeek { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
KeyConfigs
Customizes the key actions in the calendar.
For example, when using a German keyboard, the key actions can be customized using these shortcuts.
Declaration
public Dictionary<string, object> KeyConfigs { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> |
Locale
Specifies the global culture and localization of the calendar.
Declaration
public string Locale { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Max
Specifies a maximum date that is allowed a user can select in the calendar.
Declaration
public virtual DateTime Max { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
Min
Specifies a minimum date that is allowed a user can select in the calendar.
Declaration
public virtual DateTime Min { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
ServerTimezoneOffset
By default, the date value will be processed based on the system time zone.
If you want to process the initial date value using the server time zone then specify the time zone value to the ServerTimezoneOffset property.
Declaration
public double ServerTimezoneOffset { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
ShowTodayButton
Specifies whether the today button will be displayed in the calendar.
Declaration
public bool ShowTodayButton { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Start
Specifies the initial view of the calendar when it is opened. With the help of this property, the initial view can be changed to the year or decade view.
Declaration
public CalendarView Start { get; set; }
Property Value
Type | Description |
---|---|
CalendarView |
Value
Gets or sets the selected date of the Calendar.
Declaration
public T Value { get; set; }
Property Value
Type | Description |
---|---|
T |
ValueChanged
Specifies the callback to trigger when the value changes.
Declaration
public EventCallback<T> ValueChanged { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<T> |
ValueExpression
Specifies the expression for defining the value of the bound.
Declaration
public Expression<Func<T>> ValueExpression { get; set; }
Property Value
Type | Description |
---|---|
System.Linq.Expressions.Expression<System.Func<T>> |
WeekNumber
Specifies whether the week number of the year will be displayed in the calendar.
Declaration
public bool WeekNumber { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
WeekRule
Specifies the rule for defining the first week of the year.
Declaration
public CalendarWeekRule WeekRule { get; set; }
Property Value
Type | Description |
---|---|
System.Globalization.CalendarWeekRule |
Methods
ChangeEvent(EventArgs)
Declaration
protected virtual void ChangeEvent(EventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | args |