My date picker, when initialized, looks like this:
However, after changing it in the simulator, it looks like this:
The weird thing is that sometimes this happens and sometimes it doesn't. When I select June 9th it keeps the long format and anything before 1975 does as well, as long as many other random dates.
How do I format the showcase text to always be the same?
Thanks!
Edit:
Here is a GIF of the selection process.
Code:
DatePicker(selection: $dob, in: ...Date(), displayedComponents: [.date]) {
HStack(spacing: 0) {
Text("Select birthday ")
Image(systemName: "arrow.right")
}
.foregroundColor(Color("textfield"))