Class CalendarType
Specifies the calendar system to be used in calendar components.
Inheritance
Namespace: Syncfusion.Blazor.Calendars
Assembly: Syncfusion.Blazor.dll
Syntax
public sealed class CalendarType : Enum
Remarks
The CalendarType enum allows selecting between different calendar systems such as Gregorian and Islamic (Hijri).
It determines how dates are calculated, displayed, and handled in components such as SfCalendar
, SfDatePicker
, and SfDateTimePicker
.
The calendar type affects date calculations, month names, and cultural formatting.
Examples
Setting the calendar type to Islamic:
<SfCalendar TValue="DateTime" CalendarMode="CalendarType.Islamic"></SfCalendar>
Fields
Gregorian
Represents the Gregorian calendar system, which is the internationally accepted civil calendar.
Declaration
public const CalendarType Gregorian
Field Value
Type |
---|
CalendarType |
Remarks
This is the default calendar type used worldwide. The Gregorian calendar has 12 months with varying day counts, and includes leap years every four years (with some exceptions). It starts from January 1st as the new year.
Islamic
Represents the Islamic (Hijri) calendar system used in Islamic cultures.
Declaration
public const CalendarType Islamic
Field Value
Type |
---|
CalendarType |
Remarks
The Islamic calendar is a lunar calendar consisting of 12 months with approximately 354 or 355 days in a year. It starts from the year of Prophet Muhammad's migration to Medina (622 CE in the Gregorian calendar). Each month begins with the sighting of the new moon.