Witam. Mam taki javaskrypt kalendarza. basiccalendar.js
[js]function buildCal(m, y, cM, cH, cDW, cD, brdr){
var mn=['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec','Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'];
var dim=[31,0,31,30,31,30,31,31,30,31,30,31];

var oD = new Date(y, m-1, 1); //DD replaced line to fix date bug when current day is 31st
oD.od=oD.getDay()+1; //DD replaced line to fix date bug when current day is 31st

var todaydate=new Date() //DD added
var scanfortoday=(y==todaydate.getFullYear() && m==todaydate.getMonth()+1)? todaydate.getDate() : 0 //DD added

dim[1]=(((oD.getFullYear()%100!=0)&&(oD.getFullYear()%4==0))||(oD.getFullYear()%400==0))?29:28;
var t='<div class="'+cM+'"><table class="'+cM+'" cols="7" cellpadding="0" border="'+brdr+'" cellspacing="0"><tr align="center">';
t+='<td colspan="7" align="center" class="'+cH+'">'+mn[m-1]+' - '+y+'</td></tr><tr align="center">';
for(s=0;s<7;s++)t+='<td class="'+cDW+'">'+"NPWŚCPS".substr(s,1)+'</td>';
t+='</tr><tr align="center">';
for(i=1;i<=42;i++){
var x=((i-oD.od>=0)&&(i-oD.od<dim[m-1]))? i-oD.od+1 : ' ';
if (x==scanfortoday) //DD added
x='<span id="today">'+x+'</span>' //DD added
t+='<td class="'+cD+'">'+x+'</td>';
if(((i)%7==0)&&(i<36))t+='</tr><tr align="center">';
}
return t+='</tr></table></div>';
}[js]
kalendarz wyświetlany jest na przez kod:
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" lang="pl" xml:lang="pl">
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
  4. <title>Kalenda<style type="text/css">
  5.  
  6. .main {
  7. width:200px;
  8. border:1px solid black;
  9. }
  10.  
  11. .month {
  12. background-color:#7d0000;rz</title>
  13.  
  14. font:bold 20px verdana;
  15. color:white;
  16. }
  17.  
  18. .daysofweek {
  19. background-color:#7d0000;
  20. font:bold 18px verdana;
  21. color:white;
  22. }
  23.  
  24. .days {
  25. font-size: 18px;
  26. font-family:verdana;
  27. color:white;
  28. background-color: #7d0000;
  29. padding: 2px;
  30. }
  31.  
  32. .days #today{
  33. font-weight: bold;
  34. color: white;
  35. }
  36.  
  37. <div style="position: absolute; top:150px; left:270px;">
  38. <script type="text/javascript" src="basiccalendar.js">
  39.  
  40. /***********************************************
  41. * Basic Calendar-By Brian Gosselin at http://scriptasylum.com/bgaudiodr/
  42. * Script featured on Dynamic Drive (http://www.dynamicdrive.com)
  43. * This notice must stay intact for use
  44. * Visit http://www.dynamicdrive.com/ for full source code
  45. ***********************************************/
  46.  
  47. </script>
  48. </head>
  49. <body bgcolor="#7D0000"
  50. <select onChange="updatecalendar(this.options)">
  51. <script type="text/javascript">
  52.  
  53. var themonths=['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
  54. 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień']
  55.  
  56. var todaydate=new Date()
  57. var curmonth=todaydate.getMonth()+1 //get current month (1-12)
  58. var curyear=todaydate.getFullYear()+1 //get current year
  59.  
  60.  
  61. function updatecalendar(theselection){
  62. var themonth=parseInt(theselection[theselection.selectedIndex].value)+1
  63. var calendarstr=buildCal(themonth, curyear, "main", "month", "daysofweek", "days", 0)
  64. if (document.getElementById)
  65. document.getElementById("calendarspace").innerHTML=calendarstr
  66. }
  67.  
  68. document.write('<option value="'+(curmonth-1)+'" selected="yes">Wybierz miesiąc</option>')
  69. for (i=0; i<12; i++) //display option for 12 months of the year
  70. document.write('<option value="'+i+'">'+themonths[i]+' '+curyear+'</option>')
  71.  
  72.  
  73. <div id="calendarspace">
  74. //write out current month's calendar to start
  75. document.write(buildCal(1, 2008, "main", "month", "daysofweek", "days", 0))
  76. </div>
  77.  
  78. </form>
  79. </center></div>
  80. <div style="position: absolute; top:400px; left:200px;">
  81. <font color="white" face="verdana" size="2"><b>Dni oznaczone na <font color="red">czerwono</font> są już zarezerwowane.<br />
  82. (Jeszcze nie działa ;)</b></font></div>
  83. </html>

I tu moje pytanie. Chciałbym zaznaczyć niektóre daty( dzień w danym miesiącu) innym kolorem niż wynika ze stylu css. Czy jest taka możliwość? Jeśli tak to proszę o pomoc. Nie musi być koniecznie [js]. Może być kalendarz w php. Z góry dziękuję za pomoc.