Can I create a DatePicker
that displays a specific date?
Here is my code:
struct OnlineShop: View {
@State private var date = Date()
var body: some View {
DatePicker(
"Start Date",
selection: $date,
displayedComponents: [.date]
)}
}
This code displays the current date on the picker. I want to show a specific date, such as 8/29/1987.
How can I do this?