• 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
help with date formatter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

help with date formatter


  • Subject: help with date formatter
  • From: Theodore Petrosky <email@hidden>
  • Date: Sat, 11 Oct 2003 19:42:25 -0700 (PDT)

I have a textField with a date formatter. when I type
today into the field it works great however, when I
try to add a date programatically, I have a problem
with tabbing or hitting the return...

NSCalendarDate *newDate = [NSCalendarDate
dateWithString:@"Friday, July 1, 2001 23:45 PM"
calendarFormat:@"%A, %B %e, %Y %I:%M %p"];
NSLog(@"this is a string representation
%@",[newDate description]);
[dateField setObjectValue:newDate];

That populates the textField but if I tab from this
textfield to another (or type the return) the PM
changes to AM. I am running out of ideas.

Maybe I am loading the textField incorrectly.!

Please help,

Ted

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • cocoa for dummies question
      • From: Rowland Carson <email@hidden>
    • Re: help with date formatter
      • From: Jonathan Jackel <email@hidden>
  • Prev by Date: Re: Some small utility for Mac OS X.
  • Next by Date: Re: Some small utility for Mac OS X.
  • Previous by thread: Re: Are cocoa frameworks language neutral?
  • Next by thread: Re: help with date formatter
  • Index(es):
    • Date
    • Thread