?
Solved

Calendar control - Restrict Next OR Previous Months HyperLink

Posted on 2005-04-22
2
Medium Priority
?
865 Views
Last Modified: 2012-06-21
Hello,

I have a ASP.NET Calendar control displaying dates. Using the date render function, I restrict the days selectable for the earliest or latest days.

For example, If the earliest date is March 15, I just show grayed out dates for all days up to March 14.

I would like to add to this functionality by removing the "Previous Month" Hyperlink, so the user doesn't keep hitting back and get lost. Conversely, I would like to remove the "Next Month" Link when the user reaches a month where the day equals the upper limit.

Is there a way to dynamically remove either the Next Month OR Previous Month links from a calendar control, depending on what limit is reached?

Thanks in advance...
0
Comment
Question by:prodier
2 Comments
 
LVL 13

Expert Comment

by:Torrwin
ID: 13844647
Have you tried Calendar1.ShowNextPrevMonth = False ?
0
 
LVL 6

Accepted Solution

by:
sansoftura earned 2000 total points
ID: 13844658
In Calendar_VisibleMonthChanged event, you can check for e.NewDate.Month & e.NewDate.Year and make the Calendar.PrevMonthText = "" & Calendar.NextMonthText = "" for the dates you want to hide.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses
Course of the Month13 days, 22 hours left to enroll

807 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