| SuperCalendar | Pro | Enterprise | Gold |
The SuperCalendar feature of ASP-db2000 is a heavy duty calendar component that offers a wide variety of calendar functions. This component is designed for the ASP-db2002 and is available at this time as a stand alone component.
| General |
If an ASP page contains multiple calendar instances, programmer should assume separate numbers for them. User can use these numbers to set custom properties for each calendar on the page.
Syntax (2002)
X.dbCalendar = "Property list separated by [;]"
Modify the following defaults -
Index = Calendar
Field index - e.g. AddText(0).
Array of values.. = "date1, date2, date3..."
c = ""
c = c & "BGColor =
FFE4E1"
c = c & "WeekEndBGColor = AFEEEE"
c = c & "WeekNumbersBGColor = FFB6C1"
c = c & "NeighbourMonthDateColor = BC8F8F"
c = c & "UnselectableColor = C0C0C0"
c = c & "HolidayColor = FF6347"
c = c & "HighlightColor = FF0000"
c = c & "TodayHighlightColor = DDA0DD"
c = c & "DateColor = 000000"
c = c & "WeekDayColor = 0000FF"
c = c & "WeekNumbers = False"
c = c & "WeekEnd = True"
c = c & "FirstDayOfWeek = 1"
c = c & "CloseCalendarAfterClick = False"
c = c & "FirstWeekOfYear = 1"
c = c & "IsNeighbourMonthVisible = True"
c = c & "IsTodayHighlighted = True"
c = c & "DayAbbs = Sun,Mon,Tue,Wed,Thu,Fri,Sat"
c = c & "DayNames = Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday"
c = c & "MonthAbbs = Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec"
c = c & "MonthNames = "January,February,March,April,May,June,July,August,September,October,November,December"
c = c & "bImage = ImageDir & "calendar1.gif"
c = c & "Archive = /aspdb/Jars/calendar.jar"
c = c & "FrameX = 100"
c = c & "Framey = 100"
c = c & "FrameWidth = 280"
c = c & "FrameHeight = 300"
c = c & "isDateFormatUSA = True"
c = c & "Dates = 1/1/1999,1/1/2010"
c = c & "CalendarTitle = inedex, FieldName"
c = c & "AddText = index, Text"
c = c & "RowNUmber = index, # of rows of TextArea"
c = c & "SubmitFlags = index, False"
c = c & "HighLightDates = index, Array of dates"
c = c & "ExcludeDates = index, Array of Exclude dates"
X.dbCalendar = c
| Parameters |
|
Properties |
Type |
Description |
| AddText (number)=Text | String |
Adds to the text that will be disposed below the date boxes. Default = "" |
| Archive | String |
Sets or retrieves the name of the java archive file. Default = "" |
| BGColor | String |
Sets or retrieves the background color of the calendar. Default = “”, means system default. |
| ButtonImage | String |
Specifies the image to display for the popup button.Default = “”, means that no image is used. |
| CalendarTitle(number)=text | String |
Sets or retrieves the title of the calendar frame. Default = "Calendar" |
| CloseCalendarAfterClick | Boolean | Close the calendar right after the click. Def=false |
| CodeBase | String |
Sets or retrieves the URL of the applet. Default = "" |
| DateColor | String |
Sets or retrieves the color of the calendar dates. Default = “”, means the same as bgcolor |
| DateFont | Font |
Retrieves the reference to the Font object. Serves to set the date font properties (face,style,size) |
| Dates (number)="start, end" | String |
Sets or retrieves the range of the dates to allow Format: "dd/mm/yyyy,dd/mm/yyyy". Default = “”, means any. |
| DayAbbs | String |
Sets or retrieves the three-letter day abbreviations used when creating dates in your form fields based on your Date selection. Default = “Sun,Mon,Tue,Wed,Thu,Fri,Sat” |
| DayNames | String |
Sets or retrieves the day names. Default = "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday". (in IE and Netscape6 client local settings are used) |
| ExcludeDates (number) | String |
Lists the dates which cannot be chosen. Format: “dd/mm/yyyy|dd/mm, …” Default = “” |
| Field | String |
The field property set the <input> name of the field to which the calendar popup will apply. See General section of this document. |
| Font | Font |
Font objects are used to set the properties of the fonts used in Cal. The following properties are applicable to DateFont and WeekDayFont: |
| Face | String |
Sets or retrieve the name of the font. Permitted values: "Helvetica","TimesRoman","Courier". Default = "Helvetica" |
| Style | String |
Sets or retrieve the style of the font. Permitted values: "Bold","Plain","Italic". Default = "Plain" (for week days),"Bold" (for dates) |
| Size | String |
Sets or retrieve the size of the font. Default = 13 (for week days),18 (for dates) |
| FirstDayofWeek | String |
The firstdayofweek permits you to change the appearance to support various first days of week. Default = 1 (Sunday) |
| FirstWeekofYear | String |
Firstweekofyear determines which week is treated as the first week of a year. Used in conjunction with weeknumbers. Default = 1 (First week with at least one day). |
| Form | String |
The form property specifies the name of the form to attach to. |
| FrameHeight | String |
Sets or retrieves the height of the calendar frame |
| FrameWidth | String |
Sets or retrieves the width of the calendar frame. |
| FrameX | String |
Sets or retrieves the x-coordinate of the calendar frame. |
| FrameY | String |
Sets or retrieves the y-coordinate of the calendar frame. |
| HighlightColor | String |
Sets or retrieves the color to highlight the dates from the list defined by HighlightDates. |
| HighlightDates | String |
Sets or retrieves the list of the dates that should be highlighted. Format: "dd/mm/yyyy,dd/mm/yyyy,..." Default = "" |
| HolidayColor | String |
The holidaycolor property sets the color of the calendar holidays. Default = “red”. |
| Holidays | String | Lists the holidays. Default = “01/15, 02/02, 02/12, 02/14, 02/19, 03/17, 05/13, 05/28, 06/17, 07/04, 09/03, 10/08, 10/31, 11/22, 12/25, 12/31” |
| IsNeighbourMonthVisible | String |
Sets or retrieves the boolean value: true - if the neighbor month dates are displayed on the calendar false - if the neighbor month dates are not displayed. Default = true |
| IsTodayHighlighted | Boolean |
Sets or retrieves the boolean value: true - if today's date will be highlighted. false - if not. Default = true |
| Mask | String |
The mask property determines the way that
date is entered in your field.
|
| MonthAbbs | String |
The monthabbs property permits customization of the
three-day month abbreviations used when creating dates in your form fields
based on your Date selection. |
| MonthNames | String |
The monthnames property permits customization of the
month names used when creating dates in your form fields based on your date selection. |
| NeighbourMonthDateColor | String |
Sets or retrieves the color of the neighbor month dates |
| RowsNumber (number) | Long |
Sets or retrieves the number of rows of the text area. |
| Submit (number) | Boolean |
Sets or retrieves the Boolean value: - true, if the form will be submit - false, if not. Default = false |
| Title (number) | String |
Sets or retrieves the calendar title. Default = "Calendar" |
| TodayHighlightColor | String |
Sets or retrieves the color to highlight today date |
| UnselectableColor | String |
Sets or retrieves the color of the unselectable dates |
| WeekDaycolor | String |
The weekdaycolor property sets the color of the calendar weekdays. |
| WeekDayFont | Font |
Retrieves the reference to the Font object. Serves to set the week day font properties (face,style,size) |
| WeekEnd | Boolean |
Sets or retrieves the boolean value: true - if the week-end days are displayed on the calendar. false - if the week-end days are not displayed. Default = true |
| WeekEndBGColor | String |
Sets or retrieves the background color of the calendar weekends |
| WeekNumbers | Boolean |
Week numbers are displayed to the left of the calendar for reference when selecting dates. Default = false. |
| WeekNumbersBGColor | String |
Sets or retrieves the background color of the calendar weekends |
| WeekNumTitle | String |
Sets or retrieves the title for the week numbers column. Default = "" |
| Years | String |
Sets or retrieves the range of the years to allow. Format: "yyyy,yyyy". Default = "" |
| Methods | Description |
| Build (number As Long, Optional ButtonCaption As String) |
The Build method produces HTML text that causes a field to be attached to a Cal. It also creates a button or image whereby you popup the Cal from the webpage. |
| BuildHeader |
When you have completed setting properties for your Calendar object, call the buildheader method. This creates the required script. |
| Example |
|
<% set cal = server.CreateObject("ASPdb.Calendar") cal.archive = "calendar.jar" cal.buttonimage = "calendar1.gif" cal.form = "f1" cal(0) = "dat1" cal(1) = "dat2" cal(2) = "dat3" 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.excludedates(1) = "3/23/2001, 4/15/2001, 11/17/2001, 5/23/2002 - 5/25/2002" ' a single date or a range of dates 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 %> |
| Notes |
The overall concept of calendar is that Calendar should know the input it is attached to.
<%
cal(0) = "dat1"
cal(1) = "dat2"
cal(2) = "dat3"
%>
<INPUT NAME="dat1" ID="dat1"><% cal.build 0,"select" %>
<INPUT NAME="dat2" ID="dat2"><% cal.build 1,"select" %>
<INPUT NAME="dat3" ID="dat3"><% cal.build 2,"select" %>