<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/DatePickerStyle",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI15DatePickerStyleP"
  },
  "title" : "DatePickerStyle"
}
-->

# DatePickerStyle

A type that specifies the appearance and interaction of all date pickers
within a view hierarchy.

```
@MainActor @preconcurrency protocol DatePickerStyle
```

## Overview

To configure the current date picker style for a view hierarchy, use the
[`datePickerStyle(_:)`](/documentation/SwiftUI/View/datePickerStyle(_:)) modifier.

A type conforming to this protocol inherits `@preconcurrency @MainActor`
isolation from the protocol if the conformance is included in the type’s
base declaration:

```
struct MyCustomType: Transition {
    // `@preconcurrency @MainActor` isolation by default
}
```

Isolation to the main actor is the default, but it’s not required. Declare
the conformance in an extension to opt out of main actor isolation:

```
extension MyCustomType: Transition {
    // `nonisolated` by default
}
```

## Topics

### Getting built-in date picker styles

[`automatic`](/documentation/SwiftUI/DatePickerStyle/automatic)

The default style for date pickers.

[`compact`](/documentation/SwiftUI/DatePickerStyle/compact)

A date picker style that displays the components in a compact, textual
format.

[`field`](/documentation/SwiftUI/DatePickerStyle/field)

A date picker style that displays the components in an editable field.

[`graphical`](/documentation/SwiftUI/DatePickerStyle/graphical)

A date picker style that displays an interactive calendar or clock.

[`stepperField`](/documentation/SwiftUI/DatePickerStyle/stepperField)

A system style that displays the components in an editable field, with
adjoining stepper that can increment/decrement the selected component.

[`wheel`](/documentation/SwiftUI/DatePickerStyle/wheel)

A date picker style that displays each component as columns in a
scrollable wheel.

### Creating custom date picker styles

[`makeBody(configuration:)`](/documentation/SwiftUI/DatePickerStyle/makeBody(configuration:))

Returns the appearance and interaction content for a `DatePicker`.

[`DatePickerStyleConfiguration`](/documentation/SwiftUI/DatePickerStyleConfiguration)

The properties of a `DatePicker`.

[`DatePickerStyle.Configuration`](/documentation/SwiftUI/DatePickerStyle/Configuration)

A type alias for the properties of a `DatePicker`.

[`Body`](/documentation/SwiftUI/DatePickerStyle/Body)

A view representing the appearance and interaction of a `DatePicker`.

### Supporting types

[`DefaultDatePickerStyle`](/documentation/SwiftUI/DefaultDatePickerStyle)

The default style for date pickers.

[`CompactDatePickerStyle`](/documentation/SwiftUI/CompactDatePickerStyle)

A date picker style that displays the components in a compact, textual
format.

[`FieldDatePickerStyle`](/documentation/SwiftUI/FieldDatePickerStyle)

A date picker style that displays the components in an editable field.

[`GraphicalDatePickerStyle`](/documentation/SwiftUI/GraphicalDatePickerStyle)

A date picker style that displays an interactive calendar or clock.

[`StepperFieldDatePickerStyle`](/documentation/SwiftUI/StepperFieldDatePickerStyle)

A system style that displays the components in an editable field, with
adjoining stepper that can increment/decrement the selected component.

[`WheelDatePickerStyle`](/documentation/SwiftUI/WheelDatePickerStyle)

A date picker style that displays each component as columns in a scrollable
wheel.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)