Live Chat Icon For mobile
Live Chat Icon

How can I use a Calendar Control in readonly mode. i.e no links for the day and month cells.

Platform: ASP.NET| Category: Calendar

In the DayRender Event of calendar Control

VB.NET


If e.Day.IsOtherMonth Then
            e.Cell.Text = ' '
Else
            e.Cell.Text = e.Day.DayNumberText
End If

C#


if (e.Day.IsOtherMonth )
{
            e.Cell.Text = ' ';
}
else
{ 
         e.Cell.Text = e.Day.DayNumberText;
}

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.