bitfoundation / bitplatform

Build all of your apps using what you already know and love ❤️
https://bitplatform.dev
MIT License
1.07k stars 222 forks source link

DateTimePicker #185

Closed ehsangfl closed 4 years ago

ehsangfl commented 4 years ago

PersianCalendar on Bit CSharp client Application crash on release mode.

I set the "Culture" property of BitDateTimePicker to "Fa" and "CalendarSystem" property to "{x:Static noda:CalendarSystem.PersianArithmetic}" value. on debug mode, its work like charm. but when I run it on release mode or deploy to device, application crash immediately.

this error shown on deivce log: Parameter name:value at System.Globalization.DateTimeFormatInfo.set_Calendar(System.Globalization.Calendar value) at System.Globalization.DateTimeFormatInfo..ctor(System.Globalization.CultureData cultureData,System.Globalization.Calendar cal) ... ... ... System.reflection.TargetInvocationException: Exception has been thrown by the target of invocation.---> System.ArgumantOutOfRangeException: Not a valid calendar for the given culture.

if I set the "Culture" property to "fa-IR" (thats standard culture name), application work proparly, but BitDateTimePicker dont show persian month name. cause of you search for "Fa" culture name.

I think,if you change "Fa" to "fa-IR" on "StringToCultureInfoConverter" class, bug will be removed.

thanks a lot BR

ysmoradi commented 4 years ago

Could you please provide your linker description? You'll need something like followings: https://github.com/bitfoundation/bitframework/blob/master/Samples/CSharpClientSamples/Controls.Samples/Samples.Android/LinkerConfig.xml

ehsangfl commented 4 years ago

I use "SDK Only" linker. your solution solve my problem. thanks a lot BR

lock[bot] commented 4 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. Read more about our automatic conversation locking policy.