Formatting a Calendar using CSS RRS feed

  • Question

  • User1680197958 posted
    I am trying to format my calendar using css. I have an extensive list of styles that we use to keep things consistent throughout the site. I can not figure out any way to apply a CSS style to the day (or some other parts). Sure, I can apply it to the TD via cssClass but that doesn't help since the day is a link which overrides the 's class. The day font (daystyle.font...) is just a fontInfo class, which does not appear to support CSS in any way, or even attributes so I could do something like dayStyle.Font.Attributes["class"] = "myClass". Is there any way around this? p.s. Does anyone know why this was left off, in this case and in general? It is so glaringly needed that it must have been done intentionally. Since any web dev. is going to try to use css straight off I can't believe this was not noticed in testing. Then again, maybe there is a reasonable reason to forbid css, but I can't think of any.
    Sunday, January 12, 2003 7:38 PM

All replies

  • User-1687763041 posted
    Try this: <asp:Calendar ... runat="server"> <DayStyle CssClass="myClass" /> ... </asp:Calendar>
    Monday, January 13, 2003 8:00 AM
  • User-1769785422 posted
    That won't work. Here[1] is why. [1] http://weblogs.asp.net/vga/archive/2004/02/01/CalendarsBuggyStyleHandling.aspx
    Saturday, January 31, 2004 11:38 PM