Advertisement

01.10.2008 at 10:57AM PST, ID: 23073470
[x]
Attachment Details

disable day of week in calendar control

Asked by HRCB in .Net Editors & IDEs, Microsoft Visual Basic.Net, Visual Studio .NET 2005

Tags: asp.net, IE 6, 7

I have a simple calendar control on a reservations site I built in ASP.NET.  The venue is closed every Monday and Tuesday so I would like to disable those days on the calendar.  I know I can disable specific days using something like this:

dim closeddays as new style()
with closeddays
.backcolor = system.drawing.color.red
.bordercolor = system.drawing.color.white
.borderwidth = new unit(3)
end with
if e.day.date = dateadd("d", 7, "07-Jan-08") then
e.cell.applystyle(closeddays)
e.day.isselectable = false
end if

Is there an easy way to disable all Mondays and Tuesdays in the calendar control?

thanks for the help!Start Free Trial
 
Loading Advertisement...
 
[+][-]01.10.2008 at 11:09AM PST, ID: 20629990

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .Net Editors & IDEs, Microsoft Visual Basic.Net, Visual Studio .NET 2005
Tags: asp.net, IE 6, 7
Sign Up Now!
Solution Provided By: JimFive
Participating Experts: 2
Solution Grade: A
 
 
[+][-]01.10.2008 at 11:13AM PST, ID: 20630026

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628