This SwiftUI application demonstrates how to write a UI test which interacts with a DatePicker. The UI test in this application taps on a DatePicker to reveal the calendar-style popup, chooses a date in the popup and then dismisses the popup.
See the ContentView and App5UITests classes for the specifics.