blog icon indicating copy to clipboard operation
blog copied to clipboard

How to set text color for UIDatePicker

Open onmyway133 opened this issue 4 years ago • 2 comments

Apply tintColor does not seem to have effect.

datePicker.setValue(UIColor.label, forKeyPath: "textColor")
datePicker.setValue(false, forKey: "highlightsToday")

onmyway133 avatar Jun 10 '20 19:06 onmyway133

Hey @onmyway133 , use

datePicker.tintColor = UIColor.white

Yuvraj102 avatar Apr 10 '21 06:04 Yuvraj102

make this line of code: datePicker.datePickerMode = .countDownTimer before this: datePicker.setValue(UIColor.white, forKeyPath: "textColor") not after it

Hanykahlout avatar Nov 03 '22 15:11 Hanykahlout