Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

jsf inputCalendar

Posted on 2006-05-05
6
Medium Priority
?
722 Views
Last Modified: 2010-05-18

I have one bean form in which i m setting birthday = 47/02/01 (year = 1947)
in database i m saving it as mm/dd/yyyy hh:mm:ss

then when i click next birthday appears in the textbox and there i m setting calendar like :

<t:inputCalendar value="#{userBean.user.birthDate}" renderAsPopup="true" id="birthDate" style="width:25em;" >
                                      <f:convertDateTime type="date" dateStyle="short" />
                                    </t:inputCalendar>


but thing is tht whenever i click on each date chooser in turn then the year comes up as 2047 for the birth date and not the 1947.
0
Comment
Question by:gdv82
  • 3
4 Comments
 
LVL 30

Expert Comment

by:Mayank S
ID: 16614293
>> birthday = 47/02/01 (year = 1947)

Probably its getting saved as 2047 and not 1947.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16614302
Can you not set it as 1947/02/01 explicitly?
0
 

Author Comment

by:gdv82
ID: 16614337

i need short date format and moreover in the database it is saving the correct year value only.
0
 
LVL 30

Accepted Solution

by:
Mayank S earned 2000 total points
ID: 16614362
>> in the database it is saving the correct year value only

Then the problem could be that in the retrieved object, userBean.user.birthDate is being stored as 2047. You might need to figure out where that change is happening (whether the object has that wrong value or whether the calendar is buggy and considers 47 to be 2047, that's not really a bug I think).
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month10 days, 20 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question