---
title: "DatePicker Components | Explore SwiftUI"
description: "A date picker with only one displayed component. Learn how to use DatePicker Components  in SwiftUI with visual code examples."
canonical_url: "https://exploreswiftui.com/library/datepicker/datepicker-components"
meta:
  author: "Explore SwiftUI"
  "og:description": "A date picker with only one displayed component. Learn how to use DatePicker Components  in SwiftUI with visual code examples."
  "og:image": "https://exploreswiftui.com/_og/d/c_Component%2Ctitle_DatePicker%2BComponents%2B%2Cdescription_A%2Bdate%2Bpicker%2Bwith%2Bonly%2Bone%2Bdisplayed%2Bcomponent%2Ccategory_DatePicker%2Cimage_~L2FwaS9pbWFnZXMvNTkvdmFyaWFudHMvMTE4P3Y9MTc5MDA3MzQ3ODg0MiZyPTImdz0xMjgwJnE9ODUmZj1qcGVn%2CimageMode_crop%2CimagePosition_center%2CimageFrame_~cG9zaXRpb246IGFic29sdXRlOyByaWdodDogMDsgd2lkdGg6IDY0MHB4OyBoZWlnaHQ6IDQ4MHB4OyBkaXNwbGF5OiBmbGV4OyBvdmVyZmxvdzogaGlkZGVuOyBiYWNrZ3JvdW5kOiAjRkZGRkZGOyBib3gtc2hhZG93OiAwIC0xMHB4IDUwcHggcmdiYSgzNyw5OSwyMzUsMC4xOCk7IGJvcmRlci1sZWZ0OiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgdG9wOiA3NXB4OyBib3JkZXItdG9wOiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIHJnYmEoMCwwLDAsMC4wNik7IGJvcmRlci10b3AtbGVmdC1yYWRpdXM6IDMycHg7IGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDMycHg7%2Cprops_eyJwbGF0Zm9ybXMiOlsiaU9TIiwiaVBhZE9TIiwibWFjT1MiLCJ3YXRjaE9TIiwidmlzaW9uT1MiXX0%2Cp_Ii9saWJyYXJ5L2RhdGVwaWNrZXIvZGF0ZXBpY2tlci1jb21wb25lbnRzIg%2Cs_40aw9EV13scXNc98.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "DatePicker Components | Explore SwiftUI"
  "twitter:description": "A date picker with only one displayed component. Learn how to use DatePicker Components  in SwiftUI with visual code examples."
  "twitter:image": "https://exploreswiftui.com/_og/d/c_Component%2Ctitle_DatePicker%2BComponents%2B%2Cdescription_A%2Bdate%2Bpicker%2Bwith%2Bonly%2Bone%2Bdisplayed%2Bcomponent%2Ccategory_DatePicker%2Cimage_~L2FwaS9pbWFnZXMvNTkvdmFyaWFudHMvMTE4P3Y9MTc5MDA3MzQ3ODg0MiZyPTImdz0xMjgwJnE9ODUmZj1qcGVn%2CimageMode_crop%2CimagePosition_center%2CimageFrame_~cG9zaXRpb246IGFic29sdXRlOyByaWdodDogMDsgd2lkdGg6IDY0MHB4OyBoZWlnaHQ6IDQ4MHB4OyBkaXNwbGF5OiBmbGV4OyBvdmVyZmxvdzogaGlkZGVuOyBiYWNrZ3JvdW5kOiAjRkZGRkZGOyBib3gtc2hhZG93OiAwIC0xMHB4IDUwcHggcmdiYSgzNyw5OSwyMzUsMC4xOCk7IGJvcmRlci1sZWZ0OiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgdG9wOiA3NXB4OyBib3JkZXItdG9wOiAxcHggc29saWQgcmdiYSgwLDAsMCwwLjA2KTsgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIHJnYmEoMCwwLDAsMC4wNik7IGJvcmRlci10b3AtbGVmdC1yYWRpdXM6IDMycHg7IGJvcmRlci1ib3R0b20tbGVmdC1yYWRpdXM6IDMycHg7%2Cprops_eyJwbGF0Zm9ybXMiOlsiaU9TIiwiaVBhZE9TIiwibWFjT1MiLCJ3YXRjaE9TIiwidmlzaW9uT1MiXX0%2Cp_Ii9saWJyYXJ5L2RhdGVwaWNrZXIvZGF0ZXBpY2tlci1jb21wb25lbnRzIg%2Cs_40aw9EV13scXNc98.png"
  "twitter:title": "DatePicker Components | Explore SwiftUI"
---

> Index of every page on this site: [llms.txt](https://exploreswiftui.com/llms.txt)

**Interactive previews**[ iPhone](https://exploreswiftui.com/iphone?element=59)

# **DatePicker Components **

A date picker with only one displayed component

![DatePicker Components  - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/59/variants/118?v=1790073478842&r=2&w=800&q=80&f=webp)

### **Platform Compatibility**

iOS 13.0+ iPadOS 13.0+ macOS 10.15+ watchOS 10.0+ visionOS 1.0+

### **Tags**

### **SwiftUI Code**

[ Docs](<https://developer.apple.com/documentation/swiftui/datepicker/init(selection:displayedcomponents:label:)>)

```
@State var date = Date()

var body: some View {
    VStack {
        DatePicker("Select Date", selection: $date, displayedComponents: .date)
        DatePicker("Select Date", selection: $date, displayedComponents: .hourAndMinute)
    }
}
```

### **Found an issue or have a suggestion?**

Created: June 4, 2025Updated: December 27, 2025

### **More DatePicker Components **

[**View all **](https://exploreswiftui.com/library/datepicker)

![Future DatePicker - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/68/variants/18?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Future DatePicker**

Creates an instance that selects multiple dates on or after some start date

![MultiDatePicker - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/67/variants/203?v=1790073478842&r=2&w=412&q=75&f=webp)

### **MultiDatePicker**

A control for picking multiple dates.

![DatePicker Colors - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/66/variants/245?v=1790073478842&r=2&w=412&q=75&f=webp)

### **DatePicker Colors**

Customizing the colors of the date picker

![FieldDatePickerStyle - macOS - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/65/variants/324?v=1790073478842&r=2&w=412&q=75&f=webp)

### **FieldDatePickerStyle**

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

![StepperFieldDatePickerStyle - macOS - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/64/variants/96?v=1790073478842&r=2&w=412&q=75&f=webp)

### **StepperFieldDatePickerStyle**

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

![WheelDatePickerStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/63/variants/73?v=1790073478842&r=2&w=412&q=75&f=webp)

### **WheelDatePickerStyle**

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

![GraphicalDatePickerStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/62/variants/420?v=1790073478842&r=2&w=412&q=75&f=webp)

### **GraphicalDatePickerStyle**

A date picker style that displays an interactive calendar or clock

![Hour Minute Seconds DatePicker - watchOS - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/61/variants/181?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Hour Minute Seconds DatePicker**

A DatePicker for just hour, minute, and second.

### **Explore Other Components **

[**Browse all **](https://exploreswiftui.com/)

![List Row Separator Tint - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview](https://exploreswiftui.com/api/images/117/variants/291?v=1790073478842&r=2&w=412&q=75&f=webp)

### **List Row Separator Tint**

Sets the tint color associated with a row.

![Only Horizontal Split Arrangement Style - iOS on iPhone Duo - Portrait - Fully Open - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/245/variants/1614?v=1791207712827&r=2&w=412&q=75&f=webp)

### **Only Horizontal Split Arrangement Style**

Creates a horizontal split arrangement only in portrait orientation. In landscape orientation, no split is applied.

![ProgressView Colors - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/81/variants/24?v=1790073478842&r=2&w=412&q=75&f=webp)

### **ProgressView Colors**

Customizing the colors of the ProgressView

![Custom Slider Ticks - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/86/variants/375?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Custom Slider Ticks**

Creates a slider to select a value from a given range, subject to a step increment, which displays the provided labels and customizable ticks.

![Toolbar Item Visibility Priority - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/238/variants/733?v=1792389091475&r=2&w=412&q=75&f=webp)

### **Toolbar Item Visibility Priority**

Defines the visibility priority for a toolbar item.

![AccessoryCircularGaugeStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/41/variants/219?v=1790073478842&r=2&w=412&q=75&f=webp)

### **AccessoryCircularGaugeStyle**

A gauge style that displays an open ring with a marker that appears at a point along the ring to indicate the gauge’s current value

![PasteButton - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/35/variants/235?v=1790073478842&r=2&w=412&q=75&f=webp)

### **PasteButton**

A system button that reads items from the pasteboard and delivers it to a closure.

![Picker Divider - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview](https://exploreswiftui.com/api/images/177/variants/540?v=1790073478842&r=2&w=412&q=75&f=webp)

### **Picker Divider**

A Picker with a Divider

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://exploreswiftui.com/#website","@type":"WebSite","description":"A visual library for SwiftUI APIs, components, and modifiers","inLanguage":"en-US","name":"Explore SwiftUI","url":"https://exploreswiftui.com/","publisher":{"@id":"https://exploreswiftui.com/#identity"}},{"@id":"https://exploreswiftui.com/library/datepicker/datepicker-components#webpage","@type":"WebPage","dateModified":"2025-12-27T17:28:35.572Z","datePublished":"2025-06-04T15:15:42.450Z","description":"A date picker with only one displayed component. Learn how to use DatePicker Components  in SwiftUI with visual code examples.","name":"DatePicker Components","url":"https://exploreswiftui.com/library/datepicker/datepicker-components","breadcrumb":{"@id":"https://exploreswiftui.com/library/datepicker/datepicker-components#breadcrumb"},"isPartOf":{"@id":"https://exploreswiftui.com/#website"},"mainEntity":{"@id":"https://exploreswiftui.com/library/datepicker/datepicker-components#article"},"potentialAction":[{"@type":"ReadAction","target":["https://exploreswiftui.com/library/datepicker/datepicker-components"]}],"primaryImageOfPage":{"@id":"https://exploreswiftui.com/#logo"}},{"@id":"https://exploreswiftui.com/#identity","@type":"Organization","description":"A visual library for SwiftUI APIs, components, and modifiers","name":"Explore SwiftUI","url":"https://exploreswiftui.com","logo":{"@id":"https://exploreswiftui.com/#logo"},"sameAs":["https://x.com/Typ0genius","https://mastodon.social/@Typ0genius"]},{"@id":"https://exploreswiftui.com/library/datepicker/datepicker-components#article","citation":"https://developer.apple.com/documentation/swiftui/datepicker/init(selection:displayedcomponents:label:)","dateModified":"2025-12-27T17:28:35.572Z","datePublished":"2025-06-04T15:15:42.450Z","description":"A date picker with only one displayed component. Learn how to use DatePicker Components  in SwiftUI with visual code examples.","headline":"DatePicker Components","inLanguage":"en-US","name":"DatePicker Components","thumbnailUrl":"https://exploreswiftui.com/api/images/59/variants/118?v=1790073478842&r=2","url":"https://exploreswiftui.com/library/datepicker/datepicker-components","@type":["Article","TechArticle"],"about":{"@type":"Thing","name":"SwiftUI"},"author":{"@id":"https://exploreswiftui.com/#identity"},"hasPart":{"@id":"https://exploreswiftui.com/library/datepicker/datepicker-components#source-code"},"image":{"@id":"https://exploreswiftui.com/#/schema/image/1"},"isPartOf":{"@id":"https://exploreswiftui.com/library/datepicker/datepicker-components#webpage"},"mainEntityOfPage":{"@id":"https://exploreswiftui.com/library/datepicker/datepicker-components#webpage"},"publisher":{"@id":"https://exploreswiftui.com/#identity"}},{"@id":"https://exploreswiftui.com/library/datepicker/datepicker-components#source-code","@type":"SoftwareSourceCode","codeSampleType":"full example","description":"A date picker with only one displayed component. Learn how to use DatePicker Components  in SwiftUI with visual code examples.","name":"DatePicker Components  SwiftUI Example","programmingLanguage":"Swift","runtimePlatform":"SwiftUI","text":"@State var date = Date()\n\nvar body: some View {\n    VStack {\n        DatePicker(\"Select Date\", selection: $date, displayedComponents: .date)\n        DatePicker(\"Select Date\", selection: $date, displayedComponents: .hourAndMinute)\n    }\n}","about":[{"@type":"Thing","name":"SwiftUI"},{"@type":"Thing","name":"DatePicker"},{"@type":"Thing","name":"DatePicker Components "}]},{"@id":"https://exploreswiftui.com/library/datepicker/datepicker-components#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://exploreswiftui.com","position":1},{"@type":"ListItem","name":"DatePicker","item":"https://exploreswiftui.com/library/datepicker","position":2},{"@type":"ListItem","name":"DatePicker Components ","item":"https://exploreswiftui.com/library/datepicker/datepicker-components","position":3}]},{"@id":"https://exploreswiftui.com/#logo","@type":"ImageObject","caption":"Explore SwiftUI","contentUrl":"https://exploreswiftui.com/apple-touch-icon.png","inLanguage":"en","url":"https://exploreswiftui.com/apple-touch-icon.png"},{"@id":"https://exploreswiftui.com/#/schema/image/1","@type":"ImageObject","contentUrl":"https://exploreswiftui.com/api/images/59/variants/118?v=1790073478842&r=2","inLanguage":"en","url":"https://exploreswiftui.com/api/images/59/variants/118?v=1790073478842&r=2"}]}
```