Skip to Content
0
Former Member
Mar 26, 2004 at 01:48 PM

Date Picker - java.sql.Date

178 Views

to make use of the Date Picker UI-Element I declared my Context-Field of type Date which is mapped to java.sql.Date. (Why?)

Now I want to show today's Date as default value.

The following code gives me e.g dd.MM.yy as value in my InputField. I want the format dd.MM.yyyy which is what DatePicker gives back.

How can I achieve that?

Regards

Michael

java.util.Calendar cal = new GregorianCalendar();

java.sql.Date bookingDate = new java.sql.Date(cal.getTime().getTime());