iOS UIDatePicker "Time" label locale / language not working

154 Views Asked by At

Is there any way to change the language/locale of the label with "Time" string on UIDatePicker? This is my date picker configuration:

datePicker.locale = Locale(identifier: "de_DE")
datePicker.calendar.locale = Locale(identifier: "de_DE")
datePicker.datePickerMode = .dateAndTime
datePicker.preferredDatePickerStyle = .inline

And it is displayed as on the screenshot:

UIDatePicker

As you can see the "Time" label is still in English but I expected it to be in German. Is there any way to fix that or maybe at least hide this label?

0

There are 0 best solutions below