Hide days that aren't in current month:
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
if (e.Day.Date.Month != Calendar1.VisibleDate.Month)
e.Cell.Text = "";
}
Disable link for particular day (the 23rd, in this case):
protected void cal_DayRender(object source, DayRenderEventArgs e)
{
if (e.Day.Date.Day == 23)
{
e.Cell.Controls.Clear();
e.Cell.Text = e.Day.DayNumberText;
e.Cell.BackColor = System.Drawing.Color.Gainsboro;
}
}
No comments:
Post a Comment