Solved

Calendar Control: How to disable hyperlink for a date and how to remove dates from other months

Posted on 2004-04-22
3
796 Views
Last Modified: 2008-02-26
I have a calendar control in which I want to disable hyperlink on few dates based on some values and also I dont want the dates from other months to be displayed.

Can someone help me with this??

Thanks
Jack
0
Comment
Question by:jackrock79
  • 2
3 Comments
 
LVL 28

Accepted Solution

by:
mmarinov earned 250 total points
ID: 10893396
you can use this
private void Calendar1_DayRender(object sender, System.Web.UI.WebControls.DayRenderEventArgs e)
{
      if ( e.Day.Date.Month != DateTime.Now.Month )
      {
          e.Cell.Text = ""; //clears the cell's
      }
      if ( e.Day.Date.Day == 5 )
          e.Day.IsSelectable = false;
}

B..M
0
 
LVL 2

Author Comment

by:jackrock79
ID: 10893763
Thanks for the code
0
 
LVL 28

Expert Comment

by:mmarinov
ID: 10894057
Hi jackrock79, why Grade B - isn't this code what you are looking for ?

B..M
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now