Crash occured in UIDatePicker Calendar type

I am encountering a consistent, reproducible crash in our app when presenting a UIDatePicker configured with the calendar style. The crash triggers every single time the picker is invoked and points directly to the modern date picker's internal UICollectionView.

The Exception:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UICollectionView internal inconsistency: attempted to set layout with the collection view requiring a reload'

let datePicker = UIDatePicker() datePicker.datePickerMode = .date datePicker.preferredDatePickerStyle = .compact

This crash is occuring in inline style too when I try to open the calendar.

I tried this in other apps. It works fine. I didn't override any collectionView layouts

If you can reproduce this in a sample project, we would love to take a look at it. Please submit a bug report via Feedback Assistant and attach the reproducible sample, and reply with the Feedback ID so that we can help diagnose the issue.

Crash occured in UIDatePicker Calendar type
 
 
Q