BoldSign®Effortlessly integrate e-signatures into your app with the BoldSign® API. Create a sandbox account!
I'm trying to edit the date in my SfDatagrid but I got an error:
System.ArgumentOutOfRangeException: 'Specified time is not supported in this calendar. It should be between 04/30/1900 00:00:00 (Gregorian date) and 11/16/2077 23:59:59 (Gregorian date), inclusive. Arg_ParamName_Name
ArgumentOutOfRange_ActualValue'
please note that I use Winform with .Net core7 and Syncfusion 26.2.10
and my application has two languages (Ar) + (Turkish) so in Turkish I can edit the date and the error doesn't appear but in Arabian, I always get the error as you see in the attached video.
and I run this void at the start of the application to set the settings of the language.
public void Get_Lang_And_Apply(Form xFrm)
{
// الاحتفاظ بالثقافة الافتراضية للتواريخ والأرقام
CultureInfo xCult = new CultureInfo("en-US");
xCult.NumberFormat.NumberDecimalSeparator = ".";
xCult.DateTimeFormat.Calendar = new GregorianCalendar(); // ضبط التقويم الميلادي
Thread.CurrentThread.CurrentCulture = xCult;
switch (AppSettings.Default.Lang)
{
case "ar-SA":
{
CultureInfo xCultAr = new CultureInfo("ar-SA");
xCultAr.NumberFormat.NumberDecimalSeparator = "."; // استخدام النقطة كفاصلة عشرية
xCultAr.DateTimeFormat.Calendar = new GregorianCalendar(); // ضبط التقويم الميلادي
Thread.CurrentThread.CurrentCulture = xCultAr;
Thread.CurrentThread.CurrentUICulture = xCultAr;
xFrm.RightToLeft = RightToLeft.Yes;
xFrm.RightToLeftLayout = true;
}
break;
case "tr-TR":
{
CultureInfo turkishCulture = new CultureInfo("tr-TR");
turkishCulture.NumberFormat.NumberDecimalSeparator = ","; // استخدام الفاصلة كفاصلة عشرية
turkishCulture.DateTimeFormat.Calendar = new GregorianCalendar(); // ضبط التقويم الميلادي
Thread.CurrentThread.CurrentCulture = turkishCulture;
Thread.CurrentThread.CurrentUICulture = turkishCulture;
xFrm.RightToLeft = RightToLeft.No;
xFrm.RightToLeftLayout = false;
}
break;
}
}
please let me know if you have any solution
Hi Mohamed,
We are currently analyzing the reported scenario, and we need more time to validate this scenario, we will share further details on October 24, 2024.
Regards,
Manikanda Akash
Hi Mohamed,
The ar-SA culture utilizes the UmAlQuraCalendar. The exception occurs when using the GregorianCalendar. Kindly switch the Calendar type and adjust the ShortDatePattern to check if this resolves the reported exception.
xCultAr.DateTimeFormat.Calendar = new UmAlQuraCalendar();
xCultAr.DateTimeFormat.ShortDatePattern = "MM/dd/yyyy";
Regards,
Bhaskar Suresh
when I use it I see Hijri Calendar but what I need calendar like : 2024-10-26 so I don't need HIJRI CALENDAR
Hi Mohamed,
The ar-SA culture utilizes the Hijri calendar, and there is no direct support available for modifying this culture and calendar system. We will validate regarding this and provide an update by November 4, 2024.
Regards,
Bhaskar Suresh
Hi Mohamed,
We apologize for any inconvenience caused. We are currently reviewing your reported query and will provide an update by November 6, 2024. We appreciate your patience until then.
Regards,
Bhaskar Suresh
Hi Mohamed,
We are validating the reported query with the source. We will provide an update by November 8, 2024. We appreciate your patience until then.
Regards,
Bhaskar Suresh
Hi Mohamed,
We have analyzed your requirement for “Provide support to display the date in Gregorian format when using ar-SA culture in SfDateTimeEdit control”. We have logged a feature request for the same. We will implement this feature in any of our upcoming releases.
At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We will let you know when this feature is implemented. We appreciate your patience until then.
Thank you for requesting this feature and helping us define it. We are always trying to make our products better and feature requests like yours are a key part of our product growth efforts.
If you have any more specifications/suggestions for the feature request, you can add them as a comment in the portal and cast your vote to make it count.
Regards,
Bhaskar Suresh