Hi, I have got a modified copy of ASP101's calendar script which I have modified further which now spits out this error
Response object error 'ASP 0185 : 80020003'
Missing Default Property
/default.asp, line 0
A default property was not found for the object.
The code is below:
Class gyCalendar
Dim SelectedDate
Private tmpDate
Private Sub Class_Initialize()
Call ASP101Calendar()
End Sub
Public Property Get SelectedtmDate()
SelectedtmDate = FormatDateTime(tmpDate, 1)
End Property
Private Property Let SelectedtmDate(byVal dtmDate)
tmpDate = dtmDate
End Property
Private Function GetDaysInMonth(iMonth, iYear)
Select Case iMonth
Case 1, 3, 5, 7, 8, 10, 12
GetDaysInMonth = 31
Case 4, 6, 9, 11
GetDaysInMonth = 30
Case 2
If IsDate("February 29, " & iYear) Then
GetDaysInMonth = 29
Else
GetDaysInMonth = 28
End If
End Select
End Function
Private Function GetWeekdayMonthStartsOn(dAnyDayInTheMonth)
Dim dTemp
dTemp = DateAdd("d", _
-(Day(dAnyDayInTheMonth) - 1), dAnyDayInTheMonth)
GetWeekdayMonthStartsOn = WeekDay(dTemp)
End Function
Private Function SubtractOneMonth(dtmDate)
SubtractOneMonth = DateAdd("m", -1, dtmDate)
End Function
Private Function AddOneMonth(dtmDate)
AddOneMonth = DateAdd("m", 1, dtmDate)
End Function
Private Function ASP101Calendar()
Dim dtmDate ' Date we're displaying calendar for
Dim intDIM ' Days In Month
Dim intDOW ' Day Of Week that month starts on
Dim intCurrent ' Variable we use to hold current day of month as we write table
Dim intPosition ' Variable we use to hold current position in table
'my new variables
Dim intMyNewDate ' holds new xx/xx/xx date format from the query string if we use the form
Dim intNewFullDate ' str that holds entire old date query string
Dim intFinalNewDate ' proper date format for each day link on the calendar
Dim strTemp
strTemp = ""
If IsDate(Request.QueryString("Date")) Then
dtmDate = CDate(Request.QueryString("Date"))
Else
intMyNewDate = Request.QueryString("Month") & "/" & _
Request.QueryString("Day") & "/" & _
Request.QueryString("Year")
If IsDate(intMyNewDate) Then
dtmDate = CDate(intMyNewDate)
Else
dtmDate = Date()
End If
End If
SelectedDate = dtmDate
intDIM = GetDaysInMonth(Month(dtmDate), Year(dtmDate))
intDOW = GetWeekdayMonthStartsOn(dtmDate)
Response.Write("<table class=""table""><tr><td><table class=""contenttable"">")
Response.Write("<tr class=""headertr""><td>calendar</td></tr&a mp;g t;<tr><td>")
Response.Write("<table><tr><td bgcolor=""#60786B"" align=""center"" colspan=7>")
Response.Write("<table width=""100%"" border=0 cellspacing=0 cellpadding=0><tr>")
Response.Write("<td align=""right""><a class=""smLink"" href=""events_default.asp?Date=" & SubtractOneMonth(dtmDate) & """><<</font></a></td>")
Response.Write("<td align=""center""><span class=""lgText"">" & MonthName(Month(dtmDate)) & " " & Year(dtmDate) & "</span></td>")
Response.Write("<td align=""left""><a class=""smLink"" href=""events_default.asp?Date=" & AddOneMonth(dtmDate) & """>>></a></td>")
Response.Write("</tr></table></td ></tr><tr>")
Response.Write("<td align=""center"" bgcolor=""#999999""><b>Sun</b><br><i mg src=""./images/spacer.gif"" width=""30"" height=""1"" border=""0""></td>")
Response.Write("<td align=""center"" bgcolor=""#999999""><b>Mon</b><br><i mg src=""./images/spacer.gif"" width=""30"" height=""1"" border=""0""></td>")
Response.Write("<td align=""center"" bgcolor=""#999999""><b>Tue</b><br><i mg src=""./images/spacer.gif"" width=""30"" height=""1"" border=""0""></td>")
Response.Write("<td align=""center"" bgcolor=""#999999""><b>Wed</b><br><i mg src=""./images/spacer.gif"" width=""30"" height=""1"" border=""0""></td>")
Response.Write("<td align=""center"" bgcolor=""#999999""><b>Thu</b><br><i mg src=""./images/spacer.gif"" width=""30"" height=""1"" border=""0""></td>")
Response.Write("<td align=""center"" bgcolor=""#999999""><b>Fri</b><br><i mg src=""./images/spacer.gif"" width=""30"" height=""1"" border=""0""></td>")
Response.Write("<td align=""center"" bgcolor=""#999999""><b>Sat</b><br><i mg src=""./images/spacer.gif"" width=""30"" height=""1"" border=""0""></td>")
If intDOW <> 1 Then
Response.Write("<tr bgcolor=""#EEEEEE"">")
intPosition = 1
Do While intPosition < intDOW
Response.Write("<td bgcolor=""#EEEEEE""> </td>")
intPosition = intPosition + 1
Loop
End If
intCurrent = 1
intPosition = intDOW
Do While intCurrent <= intDIM
If intPosition = 1 Then
Response.Write("<tr>")
End If
If intCurrent = Day(dtmDate) Then
Response.Write("<td bgcolor=""#555555""><b>" & intCurrent & "</b><br><br></td>")
Else
intNewFullDate = CStr(Month(dtmDate) & "/" & intCurrent & "/" & Year(dtmDate))
intFinalNewDate = FormatDateTime(intNewFullDate, 2)
Response.Write("<td bgcolor=""#EEEEEE""><a href=""
 |