• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How can I change the time format for NSDatePicker?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Using UIImageView for animations
  • Next by Date: Re: alternative to NSURLConnection sendSynchronousRequest
  • Previous by thread: [SOLVED]: Enable Scripting Failing - Missing something? Based on SimpleScripingVerbs sample
  • Next by thread: supress calling objectValueForTableColumn
  • Index(es):
    • Date
    • Thread