How to change Date Fields with default Value 01/01/1970

Tobi G, modified 12 Years ago. New Member Posts: 4 Join Date: 5/23/13 Recent Posts
Hello,

I create a new liferay user only birthday value , but the birthday is save as 01/01/1970. How I can set the value to null ?

With the back office i can only set a date value and not a "null" value.

The same situation is for custom fields. I have custom fields with date that are optional but they was set with time value 0 and not with null. With back office I can only set a date value also.

Is it possible to set birthday or date custom fields with a null value? And also to set a null value with back office of liferay? Because I can not different between a birthday that is null with 01/01/1970 and a person that have really set the birthsday value to 01/01/1970.

Thank you for your help.
thumbnail
Vitaliy Koshelenko, modified 12 Years ago. Expert Posts: 319 Join Date: 3/25/11 Recent Posts
In create_account.jsp you can see the following code:

Calendar birthday = CalendarFactoryUtil.getCalendar();

birthday.set(Calendar.MONTH, Calendar.JANUARY);
birthday.set(Calendar.DATE, 1);
birthday.set(Calendar.YEAR, 1970);


You can create JSP-hook on it, changing this behaviour.


Vitaliy