This is a migrated thread and some comments may be shown as answers.
Locale error
1 Answer 18 Views
This is a migrated thread and some comments may be shown as answers.
Lewis
Top achievements
Rank 1
Lewis asked on 27 Sep 2016, 01:40 PM

Hi,

We currently have the following 2 lines of code in our calendar renderer for iOS in the OnElementChanged method in order to arrange the week layout correct in our forms app:

Control.Calendar = Foundation.NSLocale.CurrentLocale.Calendar;
Control.Locale = Foundation.NSLocale.CurrentLocale;

In our application currently on the store this works perfectly. However with the latest version after a series of actions the calendar seems to get into an state where the selected date visually shifts in the ui without publishing the selected date changed event and thereafter all dates get reported at the forms level including the locales time offset (previously utc).

I can try and put together a sample application if required but it seems to occur if the appointments source gets reassigned - but not every time.

Is this a known issue?

1 Answer, 1 is accepted

Sort by
0
Lewis
Top achievements
Rank 1
answered on 28 Sep 2016, 12:44 PM

Problem solved. We had a view with a date picker on it which seemed to affect the locale somehow - even happens with the base XF renderer.

Changed code in our Calendar renderer as follows:

Control.Locale = Foundation.NSLocale.FromLocaleIdentifier( Foundation.NSLocale.CurrentLocale.Identifier);
Control.Calendar = Control.Locale.Calendar;

Asked by
Lewis
Top achievements
Rank 1
Answers by
Lewis
Top achievements
Rank 1
Share this question
or