I am trying to create an xsl template for displaying a calendar and am having an issue pulling the event date out of the calendar items.
Here is what I have:
<xsl:template name="DateCustomStyle" match="Row[@Style='DateCustomStyle']" mode="itemstyle"> <xsl:variable name="day" select="ddwrt:FormatDateTime(string(@Created),1033,'dd')" /> <xsl:if test="count(preceding-sibling::*)=0"> <h3 class="thisweek-title">This Week</h3> </xsl:if> <div class="thisweek-item"> <div class="thisweek-date"> <span class="thisweek-abbr"> <xsl:value-of select="ddwrt:FormatDateTime(string(@EventDate),1033,'ddd')"/> </span> <span class="thisweek-day"> <xsl:value-of select="ddwrt:FormatDateTime(string(@EventDate),1033,'dd')"/> </span> </div> <div class="thisweek-events"> <ul> <li> <span> <xsl:value-of select="@Title"/></span> </li> </ul> </div> </div> <xsl:if test="count(following-sibling::*)=0"> <div class="thisweek-opencalendar"><a href="/Lists/Calendar">Open Calendar</a></div> </xsl:if> </xsl:template>
For some reason, the EventDate (which is the internal field name for Start Time) is empty. I have tested it with Created to make sure it was parsing correctly, which it is.
I am at a complete loss. I know for a fact that the date is in there, but its just not coming through.
I have also replaced EventDate with Start_x0020_Time, which is the display name of the field. Also yielded nothing.
If anyone has a suggestion I would be grateful