Calendar JSP taglib Basics
 Basics     Display     Titles     Fonts     Scrolling     Selection     Day Lists     Advanced Topics     
 
The imCalendar taglib is a simple answer to display and selection of calendar based information. imCalendar provides simple syntax for simple problems and robust flexability for more complex solutions.

View
The basic calendar displays a view of dates. A calendar may be displayed in a variety of views and format templates. The views available (figure 1) include month (left), week (center top), weekday (center bottom), and day (right). View defaults to month when not specified. The taglib syntax for each view is:
    •  <cal:calendar /> or <cal:calendar view='month' template='compressed'/>
    •  <cal:calendar view='week'/>
    •  <cal:calendar view='weekday'/>
    •  <cal:calendar view='day' template='block'/>

Template
Each view is displayed using a format template. The format templates available include compressed (figure 1, left), block (figure 1, right), plan (figure 2), list (figure 3), and full list (figure 4). Template defaults to compressed when not specified. The taglib syntax for plan (figure 2), list (figure 3), and fulllist (figure 4) is:
    •  <cal:calendar view='month' template='plan'/>
    •  <cal:calendar view='month' template='list'/>
    •  <cal:calendar view='month' template='fulllist'/>

 
Figure 1:
Dec, 2010
Su Mo Tu We Th Fr Sa
28
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
Dec, 2010
Su Mo Tu We Th Fr Sa
1
26
27
28
29
30
31
1
Mo
31
 
· Memorial Day
 Sun, 2010 
1 2 3 4 5
 Dec 
5
12
19
26
2
Figure 2:
Dec
 
Jan
 
Feb
 
Mar
 
Apr
 
May
 2010 
 
 
 
 
 
Figure 3:
Dec, 2010
5
Su
· 2nd Sunday of Advent
12
Su
· 3rd Sunday of Advent
19
Su
· 4th Sunday of Advent
24
Fr
· Christmas Day
25
Sa
· Christmas Day
31
Fr
· New Years Day
Figure 4:
Dec, 2010
1
We 
2
Th 
3
Fr 
4
Sa 
5
Su
· 2nd Sunday of Advent
6
Mo 
7
Tu 
8
We 
9
Th 
10
Fr 
11
Sa 
12
Su
· 3rd Sunday of Advent
13
Mo 
14
Tu 
15
We 
16
Th 
17
Fr 
18
Sa 
19
Su
· 4th Sunday of Advent
20
Mo 
21
Tu 
22
We 
23
Th 
24
Fr
· Christmas Day
25
Sa
· Christmas Day
26
Su 
27
Mo 
28
Tu 
29
We 
30
Th 
31
Fr
· New Years Day