DatePickerWithGraphicalStyleType
@MainActor
public struct DatePickerWithGraphicalStyleType : IntrospectableViewType
An abstract representation of the DatePicker
type in SwiftUI, with .graphical
style.
struct ContentView: View {
@State var date = Date()
var body: some View {
DatePicker("Pick a date", selection: $date)
.datePickerStyle(.graphical)
.introspect(.datePicker(style: .graphical), on: .iOS(.v14Later)) {
print(type(of: $0)) // UIDatePicker
}
}
}