FieldDatePickerStyle
A date picker style that displays the components in an editable field
Platform Compatibility
Tags
SwiftUI Code
@State var date = Date()
var body: some View {
DatePicker("Select Date", selection: $date)
.datePickerStyle(.field)
}Found an issue or have a suggestion?
More DatePicker Components
View allFuture DatePicker
Creates an instance that selects multiple dates on or after some start date
StepperFieldDatePickerStyle
A system style that displays the components in an editable field, with adjoining stepper that can increment/decrement the selected component
WheelDatePickerStyle
A date picker style that displays each component as columns in a scrollable wheel
Explore Other Components
Browse allSegmentedPickerStyle
A picker style that presents the options in a segmented control. Use this style when there are two to five options. Consider using menu when there are more than five options.
Single Subscription Store View
Creates a view that loads subscriptions based on a collection of product identifiers, and merchandises them with automatic marketing content.
Tab View Customization
Specifies the customizations to apply to the sidebar representation of the tab view.
ToolbarItem Shared Background Visibility
Controls the visibility of the glass background effect on items in the toolbar. In certain contexts, such as the navigation bar on iOS and the window toolbar on macOS, toolbar items will be given a glass background effect that is shared with other items in the same logical grouping