I have a GraphicalDatePickerStyle
DatePicker
that is hidden by default. When you click a button, it is shown.
It used to work on iOS14. But on iOS15, days' name is missing.
struct ContentView: View {
@State var isDatePickerVisible: Bool = false
@State var selectedDate = Date()
var body: some View {
VStack {
Button(action: {
isDatePickerVisible.toggle()
}, label: {
Text("Show")
})
if isDatePickerVisible {
DatePicker("Enter your birthday",
selection: $selectedDate,
displayedComponents: .date)
.datePickerStyle(GraphicalDatePickerStyle())
}
}
}
}
Result
This is how it looks like when the DatePicker
is toggled. You see name of the days are not shown.