# Miscellaneous > Database Programming >  Classic SuperCal Calendar

## Frank

Got a few inquires about the classic SuperCal. I have updated the DLL and Jar files. Contact me for download locations (Gold version only). The following is updated examples if you already have the setup files. The first example includes standard multiple instances of the calendar together with a submit version. A submit version is one that when you select a date, a submit will occur with passed along dates. Example 2 is a variation of example 1. Note that the location of the jar file is controlled by the cal.archive = "/ASPdb/Jar/calendar.jar". If you are using WS2003, you might have to place the jar file in the same dir as the asp file because of security restrictions.

<---------------------- example 1 --------------------->

HTML>
<HEAD>
</HEAD>
<BODY>
<%
response.write("dat1=" & request.querystring("dat1") & "<BR>")
response.write("dat2=" & request.querystring("dat2") & "<BR>")
response.write("dat3=" & request.querystring("dat3") & "<BR>")
set cal = server.CreateObject("SuperCal.Calendar")
cal.archive = "/ASPdb/Jar/calendar.jar"
cal.buttonimage = "calendar1.gif"
cal.holidays = "1/1, 5/1, 10/ 7,12/ 10"
cal.form = "f1"
cal(0) = "dat1"
cal(1) = "dat2"
cal(2) = "dat3"
cal.usadateformat = false
cal.highlightdates(0) = "16/3/2001, 17/3/2001, 2/01/2001"
cal.highlightdates(1) = "23/5/2001, 10/9/2003, 12/03/2004"
cal.excludedates(1) = "24/5/2001 - 5/11/2001, 11/10/2001, 1/10/2002 - 7/12/2002"
cal.dates(2) = "1/1/1990, 3/ 10/ 2020"
cal.years(2) = "  1991, 2050"
cal.addtext(0) = "It's My Calendar1 It's My Calendar1 It's My Calendar1 It's My Calendar1"
cal.addtext(0) = "It's My Calendar1"
cal.addtext(0) = "It's My Calendar1"
cal.addtext(0) = "It's My Calendar1"
cal.rowsnumber(0) = 2
cal.addtext(1) = "It's My Calendar2 It's My Calendar2 It's My Calendar2 It's My Calendar2"
cal.addtext(1) = "It's My Calendar2"
cal.addtext(1) = "It's My Calendar2"
cal.addtext(1) = "It's My Calendar2"
cal.rowsnumber(1) = 3
cal.calendartitle(0) = "calendar1"
cal.calendartitle(1) = "calendar2"
cal.submit(2) = true

cal.firstdayofweek = 2
'cal.mask = "dd-dddd mm-mmmm yyyy"
cal.mask = "mm-mmmm dd-dddd yyyy"
cal.weeknumbers = true
cal.firstweekofyear = 4
cal.isneighbourmonthvisible = true
cal.datefont.face = "Helvetica"
cal.datefont.style = "Bold"
cal.datefont.size = 18
cal.weekdayfont.face = "Helvetica"
cal.weekdayfont.style = "Plain"
cal.weekdayfont.size = 15
cal.BGColor = "FFE4E1"
cal.WeekEndBGColor = "AFEEEE"
cal.WeekNumbersBGColor = "FFB6C1"
cal.NeighbourMonthDateColor = "BC8F8F"
cal.UnselectableColor = "C0C0C0"
cal.HolidayColor = "FF6347"
cal.HighlightColor = "FF0000"
cal.DateColor = "000000"
cal.WeekDayColor = "0000FF"
cal.framex = 50
cal.framey = 50
cal.framewidth = 280
cal.frameheight = 300
cal.weekend = true
cal.weeknumtitle = "#"
cal.closecalendarafterclick = false
cal.todayhighlightcolor = "DDA0DD"


cal.buildheader
%>
<H1> Calendar Demo</H1>
Note that dat3 (last) button selects a date and then submit.
<FORM NAME=f1 ID=f1 ACTION=calendar.asp>

<INPUT NAME="dat1" ID="dat1"><% cal.build 0,"select" %>
<INPUT NAME="dat2" ID="dat2"><% cal.build 1,"select" %>
<INPUT NAME="dat3" ID="dat3" TYPE=HIDDEN><% cal.build 2,"select" %>

</FORM>

</BODY>
</HTML>

<----------------------------- example 2 --------------->

<a href="http://www.aspdb.com"><img border="0" src="topheader.jpg"></a><BR>

<%
set cal = server.CreateObject("SuperCal.Calendar")
cal.archive = "/ASpdb/Jar/calendar.jar"
cal.buttonimage = "calendar1.gif"
cal.highlightdates(0) = "3/5/2001,3/16/2001,01/01/2001"
cal.highlightdates(1) = "3/6/2001,3/17/2001,01/01/2001"
cal.form = "f1"
cal(0) = "dat1"
cal(1) = "dat2"
cal(2) = "dat3"
cal.excludedates(1) = "3/15/2001 - 4/15/2001, 11/17/2001, 5/23/2002 - 7/25/2002"
cal.dates(2) = "1/1/1990, 3/ 10/ 2020"
cal.years(2) = "  1991, 2050"
cal.firstdayofweek = 2
cal.mask = "mm-mmmm dd-dddd yyyy"
cal.holidays = "1/1, 1/17, 2/21, 3/21, 5/29, 11/23, 12/24, 12/25"
cal.weeknumbers = true
cal.firstweekofyear = 4
cal.isneighbourmonthvisible = true
cal.datefont.face = "Helvetica"
cal.datefont.style = "Plain"
cal.datefont.size = 12
cal.weekdayfont.face = "Plain"
cal.weekdayfont.style = "Plain"
cal.weekdayfont.size = 12
cal.BGColor = "FFE4E1"
cal.WeekEndBGColor = "AFEEEE"
cal.WeekNumbersBGColor = "FFB6C1"
cal.NeighbourMonthDateColor = "BC8F8F"
cal.UnselectableColor = "C0C0C0"
cal.HolidayColor = "FF6347"
cal.HighlightColor = "FF0000"
cal.DateColor = "000000"
cal.WeekDayColor = "0000FF"
cal.framex = 350
cal.framey = 350
cal.framewidth = 280
cal.frameheight = 300
cal.weekend = true
cal.weeknumtitle = "#"
cal.addtext(1) = "Text for Calendar #1"
cal.addtext(1) = "Line 2 of Calendar #1"
cal.calendartitle(0) = "Start Date"
cal.calendartitle(1) = "End Date"
cal.rowsnumber(1) = 1
cal.addtext(2) = "Text for Calendar #2"
cal.addtext(2) = "Line 2 of Calendar #2"

cal.rowsnumber(2) = 1
cal.closecalendarafterclick = false
cal.todayhighlightcolor = "DDA0DD"
cal.submit(2) = true
cal.buildheader
%>

<FONT SIZE=6 color="green" face="Arial,Helvetica"><B><I>ASP-db Super Calendar Demo</I></B></FONT>
<FORM NAME=f1 ID=f1 ACTION=calendar-1.asp>

Standard Calendar used as input to the INPUT box - <BR>
<INPUT NAME="dat1" ID="dat1" SIZE=25> <% cal.build 0,"select" %><BR>
<INPUT NAME="dat2" ID="dat2" SIZE=25> <% cal.build 1,"select" %><P>
Special calendar used as a stand alone trigger to emit a selecetd date to the URL -<BR>
<INPUT NAME="dat3" ID="dat3" TYPE=HIDDEN><% cal.build 2,"select" %>
<%
d = request.querystring("dat3")
if d <>"" then response.write ("<B>" & d & " </B>is selected.")
%>

</FORM>


<HR>
<FONT SIZE=6 color="green" face="Arial,Helvetica"><B><I>Properties</I></B></FONT><P>
multiple units individual control (*)<BR>

An individual control means you can set the properties of different calendars within the same FORM to have different characteristics.

BGColor<BR>
buttonimage<BR>
Calendar framex, framey, framewidth, frameheight<BR>
date mask<BR>
DateColor<BR>
datefont.face, style,size<BR>
firstdayofweek<BR>
firstweekofyear<BR>
HighlightColor<BR>
HolidayColor<BR>
isneighbourmonthvisible<BR>
NeighbourMonthDateColor<BR>
todayhighlightcolor<BR>
UnselectableColor<BR>
WeekDayColor<BR>
weekdayfont.face, style size<BR>
weekend<BR>
WeekEndBGColor<BR>
weeknumbers<BR>
WeekNumbersBGColor<BR>
weeknumtitle<BR>
(*) allow date range(s)<BR>
(*) allow year range(s)<BR>
(*) excludedates<BR>
(*) highlightdates<BR>
(*) holidays<BR>
(*) addtext, rownumber<BR>
(*) closecalendarafterclick<BR>
(*) title<BR>

----------

