Looks like a bug. Here is a found workaround (tested with Xcode 13beta / iOS 15)
DatePicker(
"Date",
selection: $date,
displayedComponents: .date
)
.labelsHidden()
.id(date) // << here !!
More Related Contents:
- How to hide keyboard when using SwiftUI?
- What is the difference between ObservedObject and StateObject in SwiftUI
- SwiftUI – Multiple Buttons in a List row
- SwiftUI NavigationLink loads destination view immediately, without clicking
- How to remove the default Navigation Bar space in SwiftUI NavigationView
- SwiftUI NavigationView navigationBarTitle LayoutConstraints issue
- Add bottom border line to UI TextField view in SwiftUI / Swift / Objective-C / Xamarin
- SwiftUI MVVM Coordinator/Router/NavigationLink
- iOS14 introducing errors with @State bindings
- SwiftUI @Binding Initialize
- SwiftUI: Status bar color
- SwiftUI: What is @AppStorage property wrapper
- SwiftUI List color background
- SwiftUI DatePicker Binding optional Date, valid nil
- Clear background for form sections in SwiftUI?
- How to make view the size of another view in SwiftUI
- Is there a SwiftUI equivalent for viewWillDisappear(_:) or detect when a view is about to be removed?
- Swiftui – How do I initialize an observedObject using an environmentobject as a parameter?
- iOS SwiftUI: pop or dismiss view programmatically
- How can I implement PageView in SwiftUI?
- Prevent dismissal of modal view controller in SwiftUI
- How to observe changes in UserDefaults?
- SwitUI – Two navigationLink in a list
- @Published property wrapper not working on subclass of ObservableObject
- SwiftUI: Deleting last row in ForEach
- Save ScrollViews position and scroll back to it later (offset to position)
- How to properly group a list fetched from CoreData by date?
- Proportional height (or width) in SwiftUI
- SwiftUI – Detect when ScrollView has finished scrolling?
- SwiftUI TabView PageTabViewStyle prevent changing tab?