03 August, 2012

Change date format in calendar header

If you want to change date format in calendar or any liferay portlet you can simply use FastDateFormatFactoryUtil API which is very useful to change in fornat.

Please see below sample example to change calendar header.

you can override below jsp using hook.

In init.jsp :

Format df = FastDateFormatFactoryUtil.getSimpleDateFormat("dd-MMM-yyyy");


in summary.jspf :

<liferay-ui:calendar
month="<%= selMonth %>"
day="<%= selDay %>"
year="<%= selYear %>"
headerFormat="<%= df %>"
data="<%= data %>"
/>

Popular Posts

Featured Post

Liferay 7.3 compatibility matrix

Compatibility Matrix Liferay's general policy is to test Liferay Portal CE against newer major releases of operating systems, open s...