Well, the reason you'd want to use a DateFied vs.  TextField are pretty simple.
 
A.  DateFied has a built in calender component, so they can pull up a calendar and select a date, which will auto populate a field
 
B.  You don't have to write a validator for it.(i think, don't quote me on that).
 
Go to the flex docs, and look at the mini examples they have, it should help.
 
Nick Sauro + R O U N D A R C H + bus 212.909.2335 + mob 914.882.3687
 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of javawebgrrl
Sent: Monday, July 25, 2005 1:00 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Using a Text Field vs a Date Field

Hi All,
  I have a situation where I want a user to be able to enter a date
into a Text Field. (as opposed to a dateField) (Can explain why if
you
want, but will leave this alone for now!)
  My problem is what to do if the user enters something like "abc". I
am wondering if I could use the parseDateString method of the
DateFormatter class. If this method returns a valid Date, than I can
assume all is OK, if not, I can show an error message.
  Though this method shoulw work, it does not feel like a "best
practice", any opinions on this?

Thanks.




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to