UIDatePicker September 1978 bug in ios 4.x

Using the date picker in my application, it is not possible to select a date in September 1978 except September 1. If you have September 8, 1979, and you only change the year until 1978, the day automatically goes to 1, and you can't go to any other day (they are all gray).

From other forums, other people report this error also in the built-in contacts application in the birthday field.

My application is built using Xcode 3.2.5 + ios 4.2. The problem seems to be present only on devices with ios 4.x: I tried with iPod with ios 3.1.3, and the same application works fine.

I tried compiling and working with Xcode 3.2.6 + ios 4.3, but the problem persists. The iPhone simulator (with ios 4.3) gives the same problem when adding a birthday to the contacts application.

Does anyone know of a workaround for this UIDatePicker problem? Unfortunately, I cannot find an exhaustive list of fixed bugs / known issues on the Apple Developer site ...

Friendshiplanet

+6
source share
1 answer

I found that this is a TimeZone related issue. Thus, in the time zone of Italy, an error appears on septemner 1978, at other time intervals the error may appear in other months. This explains why support from Apple and others have not found a way to reproduce it. Fortunately, in iOS 6.0 this problem disappeared!

Thus, the best solution is to compile code using libraries of iOS 6.0 (or higher).

0
source

Source: https://habr.com/ru/post/887461/


All Articles