wood burning stoves 2.0*
The moose likes JSF and the fly likes  t:inputCalendar doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark " t:inputCalendar doubt" Watch " t:inputCalendar doubt" New topic
Author

t:inputCalendar doubt

Joshua Antony
Ranch Hand

Joined: Jun 05, 2006
Posts: 254
I have a t:inputCalendar as shown below:




Is there any way by which I can get the string that is entered in the comoponent in the bean?

For ex: if the user selects 04/01/1984 can I get 04/01/1984 as string?

Regards,
Joshua


SCJP,SCWCD, Into ATG now!
Darryl Nortje
Ranch Hand

Joined: Jun 11, 2002
Posts: 140
Howzit Joshua,

You can get 04/01/1984 as a java.util.date. The use SimpleDateFormat to get the date as a String...

cheers
Darryl
Joshua Antony
Ranch Hand

Joined: Jun 05, 2006
Posts: 254
Hi Darryl,

The problem is that user can enter 04/01/1984 or 04/01/84 . If I use simple date format like dd/MM/yyyy then I will get 04/01/1984 irrespective of which two he has entered.

I have used Convertor and fixed the issue.

Regards,
Joshua
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: t:inputCalendar doubt
 
Similar Threads
Need Help for t:inputCalendar
Strange JUnit Testresult
inputCalendar and commandButton
problem with date calcaulation
Why said undetermined output?