Forums de discussion

Calendar portlet - Add Date column in Summary tab

Anshul Gupta, modifié il y a 13 années.

Calendar portlet - Add Date column in Summary tab

Regular Member Publications: 114 Date d'inscription: 05/02/10 Publications récentes
Hi All,

I need to add "Date" column in the summary tab of Calendar portlet. This is one of the several changes that I am making in the default Calendar. Right now, if you click on the summary tab, it shows time, title and type and I want to add another one which is called "Date" which will basically display the date of events (in this case, it will only show today's date).

I see that in the code, it creates a list and does headerNames.add("time") but I don't know what to do if we want to add "date" column. I tried headerNames.add("date"), but it did not solve the purpose as I could not find out how to display events dates under it.

Would really appreciate your help to it.

Thank you
Anshul
Anshul Gupta, modifié il y a 13 années.

RE: Calendar portlet - Add Date column in Summary tab

Regular Member Publications: 114 Date d'inscription: 05/02/10 Publications récentes
Also, I created a hook where I am overwriting event_iterator.jspf and this is the file where I need to add the date column.

Thank you
Anshul
Anshul Gupta, modifié il y a 13 années.

RE: Calendar portlet - Add Date column in Summary tab

Regular Member Publications: 114 Date d'inscription: 05/02/10 Publications récentes
Ok, I got the solution for this problem, so posting it just in case if anyone needs it. The code can be picked from events.jspf in the calendar portlet.

if (event.isTimeZoneSensitive()) {
row.addText(dateFormatDate.format(Time.getDate(event.getStartDate(), timeZone)), rowURL);
}
else {
row.addText(dateFormatDate.format(event.getStartDate()), rowURL);
}

Also, in the beginning, add "headerNames.add("date")" in the list.

Thank you
Anshul