myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nitin Deshmukh <deshmuk...@yahoo.com>
Subject Re: t:inputCalendar conversion problem
Date Thu, 15 May 2008 13:25:10 GMT
I had the same problem. I did the following in my action method before using the date.

if (start_date != null) {
	GregorianCalendar cal = new GregorianCalendar();
	cal.setTime(start_date);
	int year = cal.get(Calendar.YEAR);
	if (year < 100) {
		cal.set(Calendar.YEAR, year + 2000);
		start_date = cal.getTime();
	}
}


It works well for me. You can try it too.

Nitin

--- On Wed, 5/14/08, rcandersonmn <randerson@archwing.com> wrote:

> From: rcandersonmn <randerson@archwing.com>
> Subject: t:inputCalendar conversion problem
> To: users@myfaces.apache.org
> Date: Wednesday, May 14, 2008, 1:52 PM
> I'm having a problem with the way t:inputCalendar
> converts a date entered by
> a user -- not from the popup.  If the user enters 1/1/08,
> the conversion is
> 01/01/0008.
> 
> Any ideas on how to make it be 2008 instead of 0008.
> 
> Thanks for your help
> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/t%3AinputCalendar-conversion-problem-tp17237157p17237157.html
> Sent from the MyFaces - Users mailing list archive at
> Nabble.com.


      

Mime
View raw message