I build a iOS 14 DatePicker. When I selected a date from the picker, it some date in format 27 Dec 2020
and some date show in format 26/12/2020
. May I know what is the problem and how can I make it consistent?
struct ContentView : View {
@State private var birthDate = Date()
var body: some View {
VStack(alignment: .leading){
DatePicker(selection: $birthDate, in: Date()..., displayedComponents: .date){
Text("Date")
}
}.padding()
}
}