DatePickerWithGraphicalStyleType

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(.v14, .v15, .v16, .v17)) {
                print(type(of: $0)) // UIDatePicker
            }
    }
}
  • Undocumented

    See more

    Declaration

    Swift

    public enum Style