Islamic Calendar in Blazor Datetime Picker Component

14 Dec 20241 minute to read

In addition to the Gregorian calendar, the Datetime Picker control supports displaying the Islamic calendar (Hijri calendar). Islamic calendar or Hijri calendar is a lunar calendar consisting of 12 months in a year of 354 or 355 days.Users can either select a date from the Islamic calendar or manually enter a date. Additionally, you can use the ConvertToHijri and ConvertToGregorian methods to parse dates.

Also, it consists of all Gregorian calendar functionalities as like min and max date, week number, start day of the week, multi selection, enable RTL, start and depth view, localization, highlight and customize the specific dates.By default, calendar mode is in Gregorian. You can enable the Islamic mode by setting the CalendarMode as CalendarType.Islamic.

The following example demonstrates how to display the Islamic Calendar (Hijri Calendar).

  • RAZOR
  • @using Syncfusion.Blazor.Calendars
    
    <SfDateTimePicker TValue="DateTime?" CalendarMode="CalendarType.Islamic" FullScreen="true" ShowClearButton="true"></SfDateTimePicker>