Class CalendarBuilder
Inheritance
System.Object
CalendarBuilder
Assembly: Syncfusion.EJ2.dll
Syntax
public class CalendarBuilder : ControlBuilder
Constructors
CalendarBuilder()
Declaration
CalendarBuilder(Calendar)
Declaration
public CalendarBuilder(Calendar model)
Parameters
Fields
model
Declaration
Field Value
Properties
HtmlAttr
Declaration
public IDictionary<string, object> HtmlAttr { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
|
ID
Declaration
public string ID { get; set; }
Property Value
Type |
Description |
System.String |
|
Output
Declaration
public override TextWriter Output { get; set; }
Property Value
Type |
Description |
System.IO.TextWriter |
|
Overrides
Methods
CalendarMode(CalendarType)
Gets or sets the Calendar's Type like gregorian or islamic.
Declaration
public CalendarBuilder CalendarMode(CalendarType calendarMode)
Parameters
Returns
Change(String)
Triggers when the Calendar value is changed.
Declaration
public CalendarBuilder Change(string change)
Parameters
Type |
Name |
Description |
System.String |
change |
|
Returns
Created(String)
Triggers when Calendar is created.
Declaration
public CalendarBuilder Created(string created)
Parameters
Type |
Name |
Description |
System.String |
created |
|
Returns
CssClass(String)
Specifies the root CSS class of the Calendar that allows to
customize the appearance by overriding the styles.
Declaration
public CalendarBuilder CssClass(string cssClass)
Parameters
Type |
Name |
Description |
System.String |
cssClass |
|
Returns
Specifies the format of the day that to be displayed in header. By default, the format is ‘short’.
Possible formats are:
Short
- Sets the short format of day name (like Su ) in day header.
Narrow
- Sets the single character of day name (like S ) in day header.
Abbreviated
- Sets the min format of day name (like Sun ) in day header.
Wide
- Sets the long format of day name (like Sunday ) in day header.
Declaration
public CalendarBuilder DayHeaderFormat(DayHeaderFormats dayHeaderFormat)
Parameters
Returns
Depth(CalendarView)
Sets the maximum level of view such as month, year, and decade in the Calendar.
Depth view should be smaller than the start view to restrict its view navigation.
Declaration
public CalendarBuilder Depth(CalendarView depth)
Parameters
Returns
Destroyed(String)
Triggers when Calendar is destroyed.
Declaration
public CalendarBuilder Destroyed(string destroyed)
Parameters
Type |
Name |
Description |
System.String |
destroyed |
|
Returns
Enabled(Boolean)
Specifies the component to be disabled or not.
Declaration
public CalendarBuilder Enabled(bool enabled = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enabled |
|
Returns
EnablePersistence(Boolean)
Enable or disable persisting component's state between page reloads. If enabled, following list of states will be persisted.
- value
Declaration
public CalendarBuilder EnablePersistence(bool enablePersistence = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enablePersistence |
|
Returns
EnableRtl(Boolean)
Enable or disable rendering component in right to left direction.
Declaration
public CalendarBuilder EnableRtl(bool enableRtl = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableRtl |
|
Returns
FirstDayOfWeek(Int32)
Gets or 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 CalendarBuilder FirstDayOfWeek(int firstDayOfWeek)
Parameters
Type |
Name |
Description |
System.Int32 |
firstDayOfWeek |
|
Returns
HtmlAttributes(Object)
Allows additional HTML attributes such as title, name, etc., and
accepts n number of attributes in a key-value pair format.
Declaration
public CalendarBuilder HtmlAttributes(object htmlAttributes)
Parameters
Type |
Name |
Description |
System.Object |
htmlAttributes |
|
Returns
IsMultiSelection(Boolean)
Specifies the option to enable the multiple dates selection of the calendar.
Declaration
public CalendarBuilder IsMultiSelection(bool isMultiSelection = true)
Parameters
Type |
Name |
Description |
System.Boolean |
isMultiSelection |
|
Returns
KeyConfigs(Object)
Customizes the key actions in Calendar.
For example, when using German keyboard, the key actions can be customized using these shortcuts.
Declaration
public CalendarBuilder KeyConfigs(object keyConfigs)
Parameters
Type |
Name |
Description |
System.Object |
keyConfigs |
|
Returns
Locale(String)
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
public CalendarBuilder Locale(string locale)
Parameters
Type |
Name |
Description |
System.String |
locale |
|
Returns
Max(Object)
Gets or sets the maximum date that can be selected in the Calendar.
Declaration
public CalendarBuilder Max(object max)
Parameters
Type |
Name |
Description |
System.Object |
max |
|
Returns
Min(Object)
Gets or sets the minimum date that can be selected in the Calendar.
Declaration
public CalendarBuilder Min(object min)
Parameters
Type |
Name |
Description |
System.Object |
min |
|
Returns
Navigated(String)
Triggers when the Calendar is navigated to another level or within the same level of view.
Declaration
public CalendarBuilder Navigated(string navigated)
Parameters
Type |
Name |
Description |
System.String |
navigated |
|
Returns
Render()
Declaration
public HtmlString Render()
Returns
Type |
Description |
Microsoft.AspNetCore.Html.HtmlString |
|
RenderDayCell(String)
Triggers when each day cell of the Calendar is rendered.
Declaration
public CalendarBuilder RenderDayCell(string renderDayCell)
Parameters
Type |
Name |
Description |
System.String |
renderDayCell |
|
Returns
ServerTimezoneOffset(Double)
By default, the date value will be processed based on system time zone.
If you want to process the initial date value using server time zone
then specify the time zone value to serverTimezoneOffset
property.
Declaration
public CalendarBuilder ServerTimezoneOffset(double serverTimezoneOffset)
Parameters
Type |
Name |
Description |
System.Double |
serverTimezoneOffset |
|
Returns
Specifies whether the today button is to be displayed or not.
Declaration
public CalendarBuilder ShowTodayButton(bool showTodayButton = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showTodayButton |
|
Returns
Start(CalendarView)
Specifies the initial view of the Calendar when it is opened.
With the help of this property, initial view can be changed to year or decade view.
Declaration
public CalendarBuilder Start(CalendarView start)
Parameters
Returns
Value(Object)
Gets or sets the selected date of the Calendar.
Declaration
public CalendarBuilder Value(object value)
Parameters
Type |
Name |
Description |
System.Object |
value |
|
Returns
Values(Object)
Gets or sets multiple selected dates of the calendar.
{% codeBlock src='calendar/values/index.md' %}{% endcodeBlock %}
Declaration
public CalendarBuilder Values(object values)
Parameters
Type |
Name |
Description |
System.Object |
values |
|
Returns
WeekNumber(Boolean)
Determines whether the week number of the year is to be displayed in the calendar or not.
Declaration
public CalendarBuilder WeekNumber(bool weekNumber = true)
Parameters
Type |
Name |
Description |
System.Boolean |
weekNumber |
|
Returns
WeekRule(WeekRule)
Specifies the rule for defining the first week of the year.
Declaration
public CalendarBuilder WeekRule(WeekRule weekRule)
Parameters
Returns