1

I have a problem with the asp:Calendar control. I want the weekends to be hidden and unelectable.

I've hid the days thus:

if (e.Day.IsWeekend)
    {
        e.Cell.Controls.Clear();
        e.Cell.Text = e.Day.DayNumberText;
        e.Cell.CssClass = "cal_weekend";
        e.Cell.Visible = false;
    }

And I also collapsed the day-titles with css:

th.cal_dayTitle:nth-child(6),  th.cal_dayTitle:nth-child(7){visibility:collapse;}

Her the real problem comes: How do I change the colspan on an asp.net calendar control? The automatically generated table is shown below:

<td colspan="7" >

Hope you are able to help me out :)

P.S. Already looked at How to change colspan of a td dynamically in c#? but it doesn't seem to fit my problem.

Community
  • 1
  • 1
Mowinckel
  • 195
  • 1
  • 3
  • 15

0 Answers0