I know that this question as been made other times, but with xCode 7 and iOS9.2 is it possible to change the font color of "today" date on a UIDatePicker?
[self.dpData setValue:[UIColor colorWithRed:111/255.0f green:113/255.0f blue:121/255.0f alpha:1.0f] forKeyPath:@"setHighlightsToday"];
I tried this and it crashed, so I know that this don't work.
Any other options that I have, or I really need to build my own DatePicker?
Thanks in advance.
A safer/easier way to do it is to simply set the value of the key "highlightsToday". Here's a Swift 2.2 example:
With some more search I found the solution.
With this solution we can change the color of the text (even today date) without problems.
I used the same method Richardo until now, but it is using a private api that could always become unavailable or Apple might reject it. I just changed my code (as hacky and ugly as it is) to just change the date picker to a different mode and back - this causes the Today color to get the textColor that was set before.
good enough for me.
Going through the documentation for this class and it's parent class it says it's still not possible
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDatePicker_Class/index.html#//apple_ref/doc/uid/TP40006806
Yes you should make your own, since with an item picker it's possible.
This is really stupid on Apple's behalf