SelectedDate is not "highlighted" on iOS, when changing iOS *Calendar.Locale*
I'm using this solution - https://www.telerik.com/forums/calendar-does-not-change-first-day-of-week-according-to-current-culture#ZjdzTjeeFUaB-Ky7BAgirA - to set *RadCalendar* locale to current devide locale (maily to have different week starting day).
Changing of *Locale* itself working fine.
However it gives side effect, which is - *SelectedDate* is not "highlighted" on iOS, on initializing *RadCalendar*.
I found workaround for that, which is to set *SelectedDate = null* and then revert it back:
protected
override
void
OnAppearing()
{
// TODO - Temporary workaround for Telerik issue at iOS - *SelectedDate* is not setting selection in UI, for Appearing of Calendar (setting/changing date works fine)
// Workaround is to fill temporary *DateTime* object with *SelectedDate*, then setting *null* to *SelectedDate*, and then restoring original date back on *SelectedDate* (SIC!)
if
(Device.RuntimePlatform == Device.iOS && Calendar.SelectedDate !=
null
)
{
var cachedDateTime = Calendar.SelectedDate.Value;
Calendar.SelectedDate =
null
;
Calendar.SelectedDate = cachedDateTime;
}
base
.OnAppearing();
}
It's working, but I would like to avoid such crappy workarounds.
App without setting *Locale* OR with setting *Locale* + above workaround:
- attached *rc1.png*
App with setting *Locale* + without above workaround:
- attached *rc2.png*
I'm also attaching simple reproducable project, with latest Telerik DLL release + latest XF nuget release:
- https://mega.nz/#!TZQxlJpD!1ORXQe7CFLXP7osu7vmWk_mmFgVlGQsOqZ2pED4teiI