Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
How to change Date Fields with default Value 01/01/1970
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.
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.
In create_account.jsp you can see the following code:
You can create JSP-hook on it, changing this behaviour.
Vitaliy
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