当前位置: 动力学知识库 > 问答 > 编程问答 >

jsf 2 - Date selection with separate boxes for day, month and year

问题描述:

I'm making a Java EE + EJB + JSF web app and I'd like to have 3 select boxes for date of birth(1 for day, 1 for month and 1 for year) in my registration form just like on Facebook.

Of course selected date needs to be valid, so for example if someone chooses February 2009, the range of days to choose has to be only 1-28.

How can I achieve this?

网友答案:

I would consider using a component library for this purpose. To avoid implementing all validations-checks by myself. The major jsf-component libraries have things similar to what you want.

Here is a primefaces example of a component that comes close to what you want.

and here is a richfaces example

分享给朋友:
您可能感兴趣的文章:
随机阅读: