Blog

iOS 14: Changes in the UIDatePicker

Let's take a look at how the release of iOS 14 changed the UIDatePicker.

Some time ago I wrote about the changes in iOS 14 UISearchBar. But these are not all the differences between Apple's last mobile OS version and the previous ones. This time I would like to focus on the changes in UIDatePicker - a module responsible for picking dates in your app.

Pickers in ios14

In iOS we can find two types of pickers - UIPickerView and UIDatePicker. Whilst the first one is for the general purposes, the second one is only for dates & hours. Although through its entire career the Date Picker underwent a number of changes, the latest are more important than ever.

Previously UIDatePicker was based on scrolling dates. But in iOS 14 preferredDatePickerStyle appeared. It lets you choose the style - no only the well-known wheel from previous versions, but also:

  • automatic
  • inline
  • compact.

Let's take a closer look at them.

The UIDatePicker automatic style

This style leaves determining the style to the system. IOS 14 will choose the best look for your Date Picker while launching your app. This one can be an option if you don't care how your picker should look.

The UIDatePicker inline style

This is the biggest view for UIDatePicker. It shows the whole month with a selected date. And below it you can check the hour or pick it. The best option, if you want your users to have the easiest access to dates in the app.

UIDatePicker compact style

In this option, the UIDatePicker shows only a short version of date & time. But on the user’s tap, a bigger view is shown. Similarly to the inline style, you can pick the date or type the hour on a keyboard. It also has many other well-known functionalities.

Conclusion

If you have any Date Pickers in your app, and your app is ready for at least iOS 13 - beware. You should check, how the new UIDatePicker looks and behaves. There are more options to choose. And at last, but not least - besides preferredDatePickerStyle appeared also datePickerStyle. This one has only the get property, so don't be confused. And datePickerStyle returns a concrete style, never the automatic one.

Check our latest product - it's based on our experience of managing over 50-people strong company. The tool we're missing as a small company and not an enterprise.

humadroid.io is an employee and performance management software. It's an unique tool allowing everyone to be in the loop - by having up to date info about co-workers, time-off, benefits, assets, helping with one-on-ones, being a go-to place for company-wide announcements.

Check out humadroid.io
Top

Contact us

* Required fields

The controller of your personal data provided via this contact form is Prograils sp. z o.o., with a registered seat at Sczanieckiej 9A/10, 60-215 Poznań. Your personal data will be processed in order to respond to your inquiries and for our marketing purposes (e.g. when you ask us for our post-development, maintenance or ad hoc engagements for your app). You have the rights to: access your personal data, rectify or erase your personal data, restrict the processing of your personal data, data portability and to object to the processing of your personal data. Learn more.

Notice

We do not track you online. We use only session cookies and anonymous identifiers for the purposes specified in the cookie policy. No third-party trackers.

I understand
Elo Mordo!Elo Mordo!