I have two datepickers, but the font color is white even I set it to be black. Makes them hard to read.
DatePicker(selection: $fromDate.onChange(self.setFromDate(fromdate:)), in: ...Date(), displayedComponents: .date) {
Text("From")
.font(.body)
.foregroundColor(.black)
.fixedSize()
}
DatePicker(selection: $toDate.onChange(self.setToDate(todate:)), in: ...Date(), displayedComponents: .date) {
Text("To")
.foregroundColor(.black)
.font(.body)
.fixedSize()
}
question from:https://stackoverflow.com/questions/65921812/cant-change-the-datepicker-font-color