";
// loop thru all the dates in this month
for ( i=0; i lte 6; i=i+1 )
{
// local variable for this date
//thisDate = application.ptCalendar.date.createValidDate(arguments.curYear, arguments.curMonth, i);
thisDate = dateAdd("d", i, weekStruct.firstOfThisWeek);
curDateKey = dateFormat(thisDate, "yyyymmdd");
//determine the class for the current day or if the day has an event
dayClassTxt = ' class="#standardDayClass#"';
dayHeaderClassTxt = ' class="calEventListHeader #eventDayHeaderClass#"';
daylistClassTxt = ' class="#eventDayListClass#"';
dayText = DateFormat(thisDate,"full");
// todays date
if ( thisDate eq application.ptCalendar.date.createValidDate(year(now()),month(now()),day(now())) )
dayClassTxt = ' class="#currentDayClass#"';
// has event for this date
if ( structKeyExists(eventDataStruct, dateFormat(thisDate, 'yyyymmdd')) )
{
// Build the all the Events HTML for this DayText
detailedDayText = buildDetailedDayTextList(arguments.calendarData,arguments.eventField,eventDataStruct[dateFormat(thisDate, 'yyyymmdd')],detailLink,useEventToolTip,eventDetailOptions,false,false);
// Build the DayText (HTML)
dayText = '
';
dayText = dayText & '
';
dayText = dayText & detailedDayText;
dayText = dayText & '
';
}
else
{
// Build the NO EVENTS for this day HTML for this DayText
detailedDayText = '
No events listed for this date
';
detailedDayText = detailedDayText & '
';
// Build the DayText (HTML)
dayText = '
';
dayText = dayText & detailedDayText;
}
// output the day cell
outString = outString & "
#dayText#
";
eventCounter = eventCounter + 1;
}
if ( eventCounter EQ 0 )
{
outString = outString & '
';
dayText = "No Events Scheduled for the Week";
outString = outString & "
#dayText#
";
}
outString=outString & "
";
// calendarWrapper END
outString=outString & "