Click to See Complete Forum and Search --> : Specific day of month highlighter
hog_dude
11-16-2003, 06:37 PM
I am looking for some JavaScript coding that will highlight a specific day every month, such as the second Monday on a calander. I've searched through the database here. What I've found is close, but not quite what I need. Can anyone help?
What exactly do you mean? Highlight a day on a static calendar (not generated by JavaScript) or a dynamic one?
[J]ona
hog_dude
11-17-2003, 03:16 PM
I would like to have JavaScript highlight a day on a dynamic calander. Same day every month, such as the second Monday every month.
Do you already have this dynamic calendar script? If not, check out http://javascriptsource.com/, I believe they have a script like this.
[J]ona
hog_dude
11-17-2003, 09:26 PM
Yes, I already have a dynamic calander. I downloaded it from JavaScript Goodies dot com. It shows all of the months from virtually any year in the past you choose, up until any year you choose in the future. What I need is some coding to work with this type of calander that will highlight and print out (to the screen) certain days of every month.
I belong to a motorcycle group, which has meetings on the second Monday every month. Instead of me updating the page every month, I am looking to have the JavaScript coding do it.
You can see the calander in action at: www.hamiltonhog.ca and click on the "Dealership" link which is in the Menu on the left side.
In the second <TR> area, change the second <TD> to this:
<td bgcolor="#ccccff"><input type=text size=2 style="background: yellow;"></td>
[J]ona
hog_dude
11-18-2003, 04:35 PM
I did as you suggested. Check it out, the update has been posted. The calender, as it shows for November, works fine. BUT, change the month to a different month, like December, and you'll find the highlighted square doesn't stay on the second Monday.
<tr>
<td align=center cellpadding=0 cellspacing=0 bgcolor="#000000"><input type=button value="<<" onClick="IncDecYear(-1); if(this.form.elements[12].value != ''){this.form.elements[12].backgroundColor='yellow'; if(this.form.elements[4].value != ''){this.form.elements[4].backgroundColor='yellow';"></td>
<th cellpadding=0 cellspacing=0 bgcolor="#aaaaaa" colspan=5 align=center><input size=4 type=text value="1993"></th>
<td align=center cellpadding=0 cellspacing=0 bgcolor="#000000"><input type=button value=">>" onClick="IncDecYear(1); if(this.form.elements[12].value != ''){this.form.elements[12].backgroundColor='yellow'; if(this.form.elements[4].value != ''){this.form.elements[4].backgroundColor='yellow';"></td></tr>
[J]ona