View Full Version : asp:calendar question
Speedy
07-14-2003, 11:36 PM
Hi,
I wonder if there is a way to change the apperance
of the OtherMonthDayStyle tag in ASP.NET
so that those days ain't clickable?
What I have done for now is that I made them white
so that they don't show but if the mouse goes over them
there will be a hand and that's what I want to get ried of.
Thanks in advance
/Speedy
Speedy
07-15-2003, 07:37 AM
Ok,
I put the code below to see if someone understands it better
and maybe got an answer to this then.
If you test this code you will only see the dates of the
month that you're in at the moment but if you drag your
mouse in the area where it's empty(white)
you will get a hand cursor there.
I don't want the june and august dates to be links in
july.
Hope you understand and that someone can help me with this
/Speedy
[code]
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Web" %>
<script language="VB" runat="server">
Sub Visa_Event(sender As Object, e As EventArgs)
event20030715.Visible = false
If enKalender.SelectedDate.ToShortDateString = "2003-07-15" Then
event20030715.Visible = true
End If
End Sub
</script>
<html>
<head>
<style>
.idag {font-weight: bold; font-family: verdana; font-size: 10pt}
.dagar {font-family: verdana; font-size: 10pt}
.manad {font-family: verdana; font-size: 10pt}
.hdagar {font-family: verdana; font-size: 10pt; font-weight: bold}
</style>
</head>
<body>
<form runat="server">
<asp:calendar id="enKalender" onselectionchanged="Visa_Event" runat="server">
<OtherMonthDayStyle CssClass="manad" ForeColor="white" />
<WeekendDayStyle BackColor="#FFFFFF" ForeColor="red" />
<TodayDayStyle ForeColor="darkblue" CssClass="idag" />
<DayStyle CssClass="dagar" />
<DayHeaderStyle cssClass="hdagar" />
<NextPrevStyle CssClass="manad" />
<SelectorStyle CssClass="manad" />
<TitleStyle Font-Name="verdana" Font-Size="10" />
</asp:calendar>
</form>
<p/>
<asp:panel id="event20030715" Visible="false" runat="server">
testing the ASP.NET calendar
</asp:panel>
</body>
</html>
Speedy
07-15-2003, 10:20 PM
Hard nut to crack I guess ;)
/Speedy
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.