Reputation: 1506
I was wondering how I can change the style of a montouch datepicker? I've managed to customise the borders around the picker itself, but I'm not sure how to customise the picker.
Any help is appreciated.
Sean
Upvotes: 2
Views: 6092
Reputation: 3804
To change the color use the following in viewDidLoad() as one example:
yourPicker.setValue(UIColor.blueColor(), for Key: "textColor")
On a side note it still amazes me that the default blue color isn't the same light blue that's pretty standard on apple devices.
Upvotes: 0
Reputation: 16232
The apple doc says it all:
Appearance of Date Pickers:
You cannot customize the appearance of date pickers.
Upvotes: 3
Reputation: 2509
Like most native iOS controls, Apple is very restrictive about customization and will not allow you to modify many of their properties. Apple did this deliberately to give a consistent look-and-feel to all apps, among other reasons.
To wit, observe how few properties there are for UIKit.UIDatePicker: http://iosapi.xamarin.com/?link=T%3aMonoTouch.UIKit.UIDatePicker%2fP
If you want a highly-customized date picker, you will need to roll your own.
Upvotes: 1