Javauser007
Javauser007

Reputation: 1

Icefaces datetimeentry starting year as 00 instead 20 when i enter two digit year

I’m using icefaces datetimeentry, everything works fine except one thing. When I enter two digit year like 19, it is showing as 0019 instead of 2019. Is there any help to convert it to 2019? Do I need any converter or ajax call?

Upvotes: 0

Views: 50

Answers (1)

jmad
jmad

Reputation: 360

you must set the "pattern" attribute on the dateTimeEntry tag to a two digits year format (like "dd/MM/yy"). The default value for this property is "MM/dd/yyyy" (see icefaces taglib docs ) that yields 00yy when you set a two digits year (see SimpleDateFormat Javadoc).

Upvotes: 0

Related Questions