
Calendar demo
Calendar Demo
This demonstrates the use of calendar.tcf. For more information see the
README.
Simple calendar
Note that the selected date is highlighted (bold-face). This method call takes a single parameter:
- a date, formatted as witango date-time: 08/20/2008. (The formatting is explicitly provided to assure that single digit months and days are matched).
| August 2008 |
| Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
|
|
|
|
|
|
01
|
02
|
|
03
|
04
|
05
|
06
|
07
|
08
|
09
|
|
10
|
11
|
12
|
13
|
14
|
15
|
16
|
|
17
|
18
|
19
|
20
|
21
|
22
|
23
|
|
24
|
25
|
26
|
27
|
28
|
29
|
30
|
|
31
|
|
|
|
|
|
|
Styled calendar
Note that the table formatting has been revised. This method call takes two parameters:
- a date 08/20/2008
- class, the name of a Cascading Style Sheet class to be applied to the <table>, <tr>, <th> and <td> tags that make up the calendar table. The style sheet is embedded with the HTML source.
| August 2008 |
| Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
|
|
|
|
|
|
01
|
02
|
|
03
|
04
|
05
|
06
|
07
|
08
|
09
|
|
10
|
11
|
12
|
13
|
14
|
15
|
16
|
|
17
|
18
|
19
|
20
|
21
|
22
|
23
|
|
24
|
25
|
26
|
27
|
28
|
29
|
30
|
|
31
|
|
|
|
|
|
|
Selection calendar
This example shows how the two URIs can be used to create selection hyperlinks. This method call takes three parameters:
- a date
- change_uri, (<@APPFILE>?date=)which is used to change the month or year using this appfile.
- choose_URI (<@APPFILE>?_function=choose&date=) which is used to choose one of the dates within the month. In this case we use the choose function to redraw the calendar with a different date selected.
Style over-ride
This example shows how the apperance of the two top rows can be changed using the month and days stle. Also, we add a weekends style, and a single column date array to show the use of choose_URI for selected dates. This method call uses these parameters:
- A start date, 09/03/2005,which is fixed to present the month contaning our date_array.
- a CSS class to define the appearance
- 1-column date array containing dates to be linked
| 09/03/2005 |
| 09/13/2005 |
| 09/27/2005 |
| 09/13/2005 |
- a choose_URI to be that creates hyperlinks using dates within the date_array.
- month_style, to change the top row
- days_style, to change the second row
- weekend_style, to apply formatting to Saturday and Sunday cells.
| September 2005 |
| Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
|
|
|
|
|
01
|
02
|
03
|
|
04
|
05
|
06
|
07
|
08
|
09
|
10
|
|
11
|
12
|
13
|
14
|
15
|
16
|
17
|
|
18
|
19
|
20
|
21
|
22
|
23
|
24
|
|
25
|
26
|
27
|
28
|
29
|
30
|
|
Events calender
This example shows how events can be listed and optionally hyperlinked using a multi-dimensional date array. The method call uses these parameters:
- A date, 09/03/2005.
- a CSS class to define the appearance
- 3-column date array containing dates, text and hyperlinks. Note that not all text needs to have a hyperlink.
| 09/03/2005 | event 1 | link1 |
| 09/13/2005 | event 2 | link2 |
| 09/27/2005 | event 3 | link3 |
| 09/13/2005 | event 4 | |
- a weekend style to over-ride appearance of Saturday and Sunday cells
- holiday_style to over-ride the appearance of holiday cells
- holiday_array to list holidays
| September 2005 |
| Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
|
|
|
|
|
01
|
02
|
03
event 1
|
|
04
|
05
|
06
|
07
|
08
|
09
|
10
|
|
11
|
12
|
13
event 2
event 4
|
14
|
15
|
16
|
17
|
|
18
|
19
|
20
|
21
|
22
|
23
|
24
|
|
25
|
26
|
27
event 3
|
28
|
29
|
30
|
|
Event drill down
This example shows that each individual day can be hyperlinked via Choose_URI (for a drill-dwon to that day's events) and particular events can be listed and optionally hyperlinked using a multi-dimensional date array. The method call uses these parameters:
- A date, in this case 09/03/2005 so the data falls within the month.
- a CSS class to define the appearance
- 3-column date array containing dates, text and hyperlinks. Note that not all text needs to have a hyperlink.
| 09/03/2005 | event 1 | link1 |
| 09/13/2005 | event 2 | link2 |
| 09/27/2005 | event 3 | link3 |
| 09/13/2005 | event 4 | |
- Choose_URI
- a weekend style to over-ride appearance of Saturday and Sunday cells
- holiday_style to over-ride the appearance of holiday cells
- holiday_array to list holidays
| | < | < | September 2005 | > | > | |
| Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
|
|
|
|
|
01
|
02
|
03
event 1
|
|
04
|
05
|
06
|
07
|
08
|
09
|
10
|
|
11
|
12
|
13
event 2
event 4
|
14
|
15
|
16
|
17
|
|
18
|
19
|
20
|
21
|
22
|
23
|
24
|
|
25
|
26
|
27
event 3
|
28
|
29
|
30
|
|