ECSDevelopment
asked on
Calendar control without the weekend days
I am looking to display an ASP.NET Calendar control WITHOUT the weekend days. Is there a way to do this or does anyone know of a third party control I could use? Any information would be greatly appreciated. Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There isn't any way to control the header rendering for the days AFAIK, and Eric's suggestion of a custom web control would probably be a good way to go.
Bob
Bob
ASKER
Thank you both for your help. We'll do some research to fin the right custom control for our use or just go with the full 7 day week display if we decide we want to stick with the ASP control.
ASKER
I took a look at the link and I'm not sure that's going to be able to do what we need. What we're trying to accomplish is to display a monthly schedule of signed out equipment for our company. 95% of the requests all come on weekdays, and when people try to find out if the equipment is available they almost always only check the weekdays.
We are hoping to give the users a radio button or checkbox that will allow them to see the calendar on a full 7 day schedule if they need to but with a default display of only M-F in order to get the most use out of the available space on the page.
The closest we have been able to get is using the dayRender event we've added
If e.Day.IsWeekend Then
e.Cell.Visible = False
End If
In order to remove those cells from the calendar.
If we then set showdayheader = false for the calendar we have the display that we want except we do want to display the day headers. If anybody knows how to display day headers M-F and not the weekend day headers our problem should be solved.
The solution we have come up with but want to avoid is manually creating the calendar by dynamically making one with a table control.
I took the page we currently have, did a view soure and have pasted the code below so you can see what we have displayed in the calendar.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>EquipmentSignOut</t
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScri
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body MS_POSITIONING="GridLayout
<form name="Form1" method="post" action="equipmentsignout.a
<script language="javascript" type="text/javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.
theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENTTARGET.valu
theform.__EVENTARGUMENT.va
theform.submit();
}
// -->
</script>
<select name="ddlCategory" onchange="__doPostBack('dd
<option value="1">Big Equipment</option>
<option selected="selected" value="2">Facility</option
<option value="3">Field Equipment</option>
<option value="4">IT</option>
<option value="5">Vehicle</option>
<option value="6">Staff</option>
</select><table id="Calendar1" tabindex="4" cellspacing="0" cellpadding="2" bordercolor="Black" border="0" style="background-color:Wh
<tr><td colspan="7" style="background-color:#0
<tr><td style="color:White;font-fa
</table></td></tr><tr><td align="Center" style="background-color:Wh
</table><select name="ddlBranch" onchange="__doPostBack('dd
<option selected="selected" value="5">01 - Agawam MA</option>
<option value="6">02 - Bow NH</option>
<option value="7">03 - Auburn MA</option>
<option value="8">04 - Brattleboro VT</option>
<option value="9">05 - Wakefield MA</option>
<option value="10">06 - Tampa FL</option>
<option value="11">07 - Haddam CT</option>
<option value="12">08 - Richmond VT</option>
<option value="13">10 - GIS</option>
<option value="14">11 - Ontario NY</option>
<option value="17">12 - Columbus OH</option>
<option value="21">14 - Charlotte NC</option>
</select><span id="Label1" style="width:80px;Z-INDEX:
<span id="Label4" style="width:57px;Z-INDEX:
<select name="ddlItem" onchange="__doPostBack('dd
<option value="0">All</option>
<option selected="selected" value="120">Large Conference Room</option>
<option value="121">Small Conference Room</option>
<option value="122">Training Room</option>
<option value="123">Library</optio
<option value="126">Conference Call 1</option>
<option value="127">Conference Call 2</option>
<option value="128">Conference Call 3</option>
<option value="129">Conference Call 4</option>
<option value="6313">Bowles Road Conference Call</option>
</select>
<input type="submit" name="btnSignOut" value="Sign Out" id="btnSignOut" style="Z-INDEX: 113; LEFT: 616px; POSITION: absolute; TOP: 104px" /></form>
</body>
</HTML>