Java applet CCalendar

CCalendar is a calendar applet. You can use it as a real calendar choosing the global appearence and the photo you want to show.
You can use it as a help for you site's user to enter date in a form field. CCalendar support multilanguage for days and months, the choice of the first day of the week and adds schedule possibility. CCalendar allows you to link event to the days.
If you plan to use CCalendar as a schedule calendar, look at the example 3 for precisions.
CCalendar allows :
  • Display photos associated with each month( example 1 ).
  • Display in the HTML page the date choosen in the date format of your country ( example 2 ).
  • Display a schedule by modify the days colors ( example 3 )
  • Call a javascript function each time a day is clicked ( example 4 ).
  • Associate an event to a day and associate a different URL to each event ( example 3 ).
  • Choose the language and first day of the week in the CCalendar. You can see an example in the example 3.
See example 1, displaying photo
See example 2, minimal usage
See example 3, schedule and multilangage sample
See example 4, calling a javascript function
Click here to download ccalendar.zip

CCalendar parameters

lst_imgString list containing the name of the image you wan to appear in the calendar.The separator is the comma point ( ; ). For example lst_img="img01.gif;img02.gif;img03.gif"
event_fileURL of the event file. It can be a text file or a script to call.
The file contains one line by event. Each line contains 3 fields
  • The month
  • The day
  • The label of the event
If the filename contains the character '#', this character is replaced by the year shown by the calendar.
Example : To make the calendar call a script myscript.php3, with a parameter year equal to the year.
You must enter :
<param name="event_file" value="./myscript.php3?year=#">
You can also create an event file for each year. if you set the parameter event_file with this value :
<param name="event_file" value="./file#.evt">
CCalendar will try to open ./file2000.evt for the year 2000, ./file2001.evt for 2001, and so on....
If the character '#' is not present in the filename, the calendar will use the same event for each year.
See example 3 for more informations.
sched_fileURL of the schedule file. It can be a text file or a script to call. If the filename contains the character '#', this character is replaced by the year shown by the calendar.
Example : To make the calendar call a script myscript.php3, with a parameter year equal to the year You must enter :
<param name="sched_file" value="./myscript.php3?year=#">
When CCalendar has to show the year 2001 planning, it will try to read the URL "./myscript.php3?year=2001"
When CCalendar has to show the year 2002 planning, it will try to read the URL "./myscript.php3?year=2002"
If this character is not in the filename, CCalendar will use the same planning file for all the years.
If this parameter is not set, CCalendar will read a file called year.txt to take the schedule. ( Example 2000.txt for the year 2000 ).
Usefull example You have two workers John and Bill. To show their schedule just create the files ( for the year 2000 ) :
john2000.txt and bill2000.txt
and call the applet with parameters :
<param name="sched_file" value="./john#.txt"> to display the schedule of John
<param name="sched_file" value="./bill#.txt"> to display the schedule of Bill

The file contains a line for each month. Each line is a string of '0' and '1', one character for one day. 0 for free day, 1 for full day.
See example 3 for more informations.
color_fondBackground color
color_fullFull day color.
See example 3 for more informations.
color_caseColor of the days. Color of free day in planning mode
color_CommentComment color. The comment is the string at the bottom of the applet
color_emptyColor of the empty case. The empty case are case without valuable day
formForm where the field to update is placed
fieldName of the field to update
jvfName of the javascript function to call. Don't forget the (). See example 4
formatDate format to use in the field. String with
  • 'a' or 'y' for the year
  • 'm' for the month
  • 'd' for the day
  • Other caracters are only copied
The default format is "d/m/y"
strictString to put in the field, instead of the date, when clicking on a full day
nlcNumber of line to keep for the comment rectangle at the bottom of the calendar. The default is 1
day1..day7Support Multilanguage. Enter in these parameters the name of the days in your language. Day1 is Sunday, day7 is Saturday
Example in french
  • param name="day1" value="Dimanche"
  • param name="day2" value="Lundi"
  • param name="day3" value="Mardi"
  • param name="day4" value="Mercredi"
  • param name="day5" value="Jeudi"
  • param name="day6" value="Vendredi"
  • param name="day7" value="Samedi"
month1..month12Support Multilanguage. Enter in these parameters the name of the month in your language. Month1 is January, Month12 is December
Example in french
  • param name="month1" value="Janvier"
  • param name="month2" value="Février"
  • param name="month3" value="Mars"
  • param name="month4" value="Avril"
  • param name="month5" value="Mai"
  • param name="month6" value="Juin"
  • param name="month7" value="Juillet"
  • param name="month8" value="Aout"
  • param name="month9" value="Septembre"
  • param name="month10" value="Octobre"
  • param name="month11" value="Novembre"
  • param name="month12" value="Décembre"
etargetTarget where to show the URL associated to an event in a mulit-frame environment.
color_cdColor of the current day
fdwFirst week of the day. 0=Sunday,1=Monday...Default is 0
dinitFirst date displayed by the calendar. To avoid country date format problem, the date given must be like ddmmyyyy ( example 01012000 for First january 2000 ). The default is the current date
color_sdColor of the selected day
finitName of the field where to choose the date initially shown. This field must be in the form specified by the parameter form.