Issues with DateTimePicker on IOS

  1. SDK Version: 40
  2. Platforms(Android/iOS/web/all): iOS

A new issue just started happening for me. When trying to open the DateTimePicker on ios, I started getting this error. This package has been working fine for weeks, and without any change in the code, it stopped working. Any suggestions where to start looking to fix this?

Showing us some code might help in this case. It looks to me like it’s an issue with using multiple timezones.

You can recreate by setting the device’s time zone to Beirut, while leaving the current Region to United States (or any region other than Lebanon). Force current Region to Lebanon in Edit Scheme → Options → App Region and it doesn’t crash. But setting the picker’s locale to en_LB (Lebanon) doesn’t help. There must be something specific about the mismatch of time zone and region for Lebanon but I haven’t found it. A (poor) workaround might be to identify the mismatch and switch the picker.preferredDatePickerStyle to .wheel in that case only.

It looks like this might be an iOS issue:

Quoting the last comment:

Is this on iOS? If so, can you try this on the current iOS 14.5b5 seed (18E5186a)? Looking at Agenor’s bug there’s some indicating that it’s fixed there.

Thanks, Cornel. Glad to see that it wasn’t just happening on my end. I upgraded to the latest ios update on my iphone, and the problem persisted until I changed the device region. At least I’ll know what to tell my users if they end up traveling to Lebanon from another region like me.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.