How to remove the Day Hyperlink of ASP.NET Calendar ?

2014-03-20 asp.net calendar

I can not remove the day hyperlinks of calendar. I use calendar to show date not other.That's why I don't want to make each date as a hyperlink.

<asp:Calendar ID="homeCalendar" runat="server" BackColor="White" BorderColor="Black" Font-Names="Verdana" Font-Size="9pt" ForeColor="Black" Height="250px" Width="330px" BorderStyle="Solid" CellSpacing="1" NextPrevFormat="ShortMonth">
        <DayHeaderStyle Font-Bold="True" Font-Size="8pt" ForeColor="#333333" Height="8pt" />
            <DayStyle BackColor="#CCCCCC" />
        <NextPrevStyle Font-Bold="True" Font-Size="8pt" ForeColor="White" />
        <OtherMonthDayStyle ForeColor="#999999" />
        <SelectedDayStyle BackColor="#333399" ForeColor="White" />
        <TitleStyle BackColor="#333399" Font-Bold="True" BorderStyle="Solid" Font-Size="12pt" ForeColor="White" Height="12pt" />
        <TodayDayStyle BackColor="#999999" ForeColor="White" />
        </asp:Calendar>

Is there any way to remove the hyperlinks of Calendar ?

Answers

Just Specify the SelectionMode like:

homeCalendar.SelectionMode = CalendarSelectionMode.None;

You can specify the same in aspx like:

<asp:Calendar ID="homeCalendar" runat="server" SelectionMode ="None" 

Related