about software development

Displaying calendar items in an ItemStyle

We frequently get the question to display the next x upcoming events in a rollup webpart. A content query web part is very suitable for this, but you will needa custom ItemStyle. Below you will find the xsl to display events in the following
format:

The custom itemstyle checks for the difference between all day events, events that span multiple days and checks for start and end times.

To use this itemstyle you will need to add EventDate and EndDate to the CommonViewFields and reference the ddwrt namespace in the top of your xsl: