Calendar | |||
|
Here is a simple calendar. It's implemented using JavaScript only. All you need is to place three lines in to your HTML file: <script language="javascript" src="calendar.js"></script> <link rel="stylesheet" href="calendar.css" type="text/css"> <script language=javascript> print_calendar("");</script> The first line is to include calendar code in to your page. The third line is to draw the calendar. Put this line in that position where the calendar should be drawn. Parameter for print_calendar function is the current date to be dispalyed On the second line one include description on how your calendar should look like. Here you should describe the folowing CSS classes:
By pressing on areas 9 and 10, you can switch calendar to the previos and next month accordingly. If user define user_day_selected(Date) function, this function would be execute each time user clicked on date (areas 5, 7, 8). the folowing function defined on this page: function user_day_selected(date){ alert(date); } |