jdtcn / BlazorDateRangePicker

A Blazor component for choosing date ranges and dates
MIT License
182 stars 35 forks source link

support other Calendares like PersianCalendar #76

Open rkarimabadi opened 2 years ago

rkarimabadi commented 2 years ago

I want to use BlazorDateRangePicker component to display Persian (solar) Calendar. Some parts, such as the display of months or days of the week, can be localized by selecting "fa-IR" culture, but since you used the built-in DateTime methods to calculate the month, year and day in the calendar, all calculations are based on the Gregorian calendar. This will cause the calendar to display incorrectly. Unfortunately, the DateTime calendar cannot be changed, but the Persian Calendar Library is available from the System.Globalization for this purpose and has all methods needed. I successfully changed your code to display the Persian calendar, but it is very good that this feature is implemented in your code.