Overview
- On macOS when a user clicks on the date in a date picker field a pop up opens with options to select the date if the user taps on Esc key, then there is no option to select that field or any other field.
- Feedback: FB11812450
Questions:
- Am I missing something?
- Is this a bug? (Feedback: FB11812450)
Steps to reproduce
- Run the code (see below) on macOS
- Click on the date portion of the date picker field
- A pop up opens
- Press the Esc key
Actual Behaviour
You can't select the date picker again to change the date.
Expected Behaviour
When the the escape key is pressed the popup should close and the date picker and other text fields should be selectable again.
Code
struct ContentView: View {
@State private var date = Date()
@State private var note = "hello world"
var body: some View {
VStack {
DatePicker("Birthday", selection: $date)
TextField("Note", text: $note)
}
}
}