How can I change the time format for NSDatePicker?
How can I change the time format for NSDatePicker?
- Subject: How can I change the time format for NSDatePicker?
- From: peter ljunglöf <email@hidden>
- Date: Tue, 13 Jan 2009 23:08:53 +0100
Hi,
here's a question about the time format for NSDatePicker. There are
only two possibilities for time format: hr+min and hr+min+sec. I
recently noticed that the actual time format used is the Short resp.
Normal time format as defined in the International System Preferences.
This means that if I set the system date/time format to Swedish, I get
[21.12] in the DatePicker, but if I change the region to English
(USA), I get [9:12 PM] in the DatePicker.
So far, so good. But now I want use my own DatePicker time format in
my app - how can I do that? I tried to bind a NSDateFormatter to the
DatePicker (in Interface Builder), and IB doesn't complain, but it
doesn't work. Is there any way to, e.g., change the International
Region locally, only for one application or for one single DatePicker?
thanks,
/Peter
--------- ----- --- -- -- - - - - - - - - -
peter ljunglöf (http://www.ling.gu.se/~peb)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden