Hi
I have a couple of issues with the events calendar on this site.
The following code is only returning one the first event per day. What if there are more than one event on a day.
foreach (My_Date temp_dt in MyColllection)
{
if ("01/01/1900" != temp_dt.Cal_Date.ToShortDateString())
{
if (dayTextChanged == true)
{
break;
}
mItemDay = false;
DayVal = temp_dt.Cal_Date;
}
else
{
mItemDay =
true;
}
if (e.Day.Date == Convert.ToDateTime(temp_dt.Cal_Date.ToString("d")))
{
if (mItemDay == false)
{
strTemp =
new StringBuilder();
}
else
{
strTemp.Append(
"<br>");
}
strTemp.Append(
"<span style='font-family:verdana;font-size:10px;font-weight:bold;color'");
strTemp.Append(FontColor);
strTemp.Append(
"'><br>");
strTemp.Append(temp_dt.Cal_Title.ToString());
strTemp.Append(
"</span>");
e.Cell.BackColor = System.Drawing.
Color.Yellow;
dayTextChanged =
true;
}
}
if (dayTextChanged == true)
{
e.Cell.Controls.Add(
new LiteralControl(strTemp.ToString()));
}
Any ideas how to solve this?
Another thing I would like to call an event which brings back a list of all events on a day. How would I be able to click on the entire calendar cell and call the event and not just the day itself.
thanks