struct ContentView: View {
@State private var wakeUp = Date()
var body: some View {
DatePicker("Please enter a date", selection: $wakeUp)
}
}
Form {
DatePicker("Please enter a date", selection: $wakeUp)
}
DatePicker("Please enter a date", selection: $wakeUp)
.labelsHidden()
DatePicker("", selection: $wakeUp, displayedComponents: .hourAndMinute)
DatePicker("", selection: $wakeUp, displayedComponents: .date)
All the dates in the future, but none in the past.
DatePicker("Please enter a date", selection: $wakeUp, in: Date()...)