Xin Calendar 2 Mods: Special Days

The Special Days mod lets us apply different CSS styles to the dates at a weekly, monthly and yearly base.

To turn it on:

xcMods=[...
        {"order": 1,  "mod": "Special Days",  "script": "mod_days.js"},
        ...

or:

<script language="javascript" src="../config/xc2_default.js"></script>
<script language="javascript">
  xcMods[2].order=1;
</script>

Now we need to specify some dates and the CSS styles for those dates, and we have:

Here we have different CSS styles for different weekdays:

<head>
...
<link rel=stylesheet href="../css/xc2_default.css" type="text/css">
<style type="text/css">
.Sun { background-color:... }
.SunO { background-color:... }
.Mon { background-color:... }
.MonO { background-color:... }
.Tue { background-color:... }
.TueO { background-color:... }
.Wed { background-color:... }
.WedO { background-color:... }
.Thu { background-color:... }
.ThuO { background-color:... }
.Fri { background-color:... }
.FriO { background-color:... }
.Sat { background-color:... }
.SatO { background-color:... }
</style>
...
<head>

Note: The above CSS settings should be defined in the calendar template file (script/xc2_template.html) for Popup-Window calendars.

and we call the setLoopWeek() for each weekday:

<head>
...
<link rel=stylesheet href="../css/xc2_default.css" type="text/css">
<style type="text/css">
.Sun { background-color:#c69000; ... }
...
</style>
...
<script language="javascript" src="../script/xc2_inpage.js"></script>
<script language="javascript">
setLoopWeek("conf", "Sun:SunO", "", 1, 1, "Sun");
setLoopWeek("conf", "Mon:MonO", "", 1, 1, "Mon");
setLoopWeek("conf", "Tue:TueO", "", 1, 1, "Tue");
setLoopWeek("conf", "Wed:WedO", "", 1, 1, "Wed");
setLoopWeek("conf", "Thu:ThuO", "", 1, 1, "Thu");
setLoopWeek("conf", "Fri:FriO", "", 1, 1, "Fri");
setLoopWeek("conf", "Sat:SatO", "", 1, 1, "Sat");
</script>
<head>

[Date Info] [Back to index page]

# # #