Disabling dates in client side Calender control

I

ivsvarma

I have the requirement with regards to Calender control, where in
certain Dates needs to be disabled on the control load itself.

Thanks! in advance.
 
M

Mark Rae [MVP]

I have the requirement with regards to Calender control, where in
certain Dates needs to be disabled on the control load itself.

protected void MyCalendar_DayRender(object source, DayRenderEventArgs e)
{
if (e.Day.Date.Day == 18)
{
e.Cell.Controls.Clear();
e.Cell.Text = e.Day.DayNumberText;
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,141
Latest member
BlissKeto
Top