Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching For a calendar 1

Status
Not open for further replies.

pgtek

Programmer
Sep 28, 2001
1,180
CA
Hi
Would someone have the code for an event calender to share
I search for javascript but no luck

Thank you

pgtek

 
Hi
All i need is a event calendar that i can insert for the specific date an event our reminder.
I tried different site but no luck.
I would like javascript code and the html code.

I you have one to share i would appriciated it.

Thank you

pgtek
 
Here's some calendar code - but I don't know if this is what you're looking for.

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! -->

<!-- Begin
monthnames = new Array(
&quot;January&quot;,
&quot;February&quot;,
&quot;March&quot;,
&quot;April&quot;,
&quot;May&quot;,
&quot;June&quot;,
&quot;July&quot;,
&quot;August&quot;,
&quot;September&quot;,
&quot;October&quot;,
&quot;November&quot;,
&quot;December&quot;);
var linkcount=0;
function addlink(month, day, href) {
var entry = new Array(3);
entry[0] = month;
entry[1] = day;
entry[2] = href;
this[linkcount++] = entry;
}
Array.prototype.addlink = addlink;
linkdays = new Array();
monthdays = new Array(12);
monthdays[0]=31;
monthdays[1]=28;
monthdays[2]=31;
monthdays[3]=30;
monthdays[4]=31;
monthdays[5]=30;
monthdays[6]=31;
monthdays[7]=31;
monthdays[8]=30;
monthdays[9]=31;
monthdays[10]=30;
monthdays[11]=31;
todayDate=new Date();
thisday=todayDate.getDay();
thismonth=todayDate.getMonth();
thisdate=todayDate.getDate();
thisyear=todayDate.getYear();
thisyear = thisyear % 100;
thisyear = ((thisyear < 50) ? (2000 + thisyear) : (1900 + thisyear));
if (((thisyear % 4 == 0)
&& !(thisyear % 100 == 0))
||(thisyear % 400 == 0)) monthdays[1]++;
startspaces=thisdate;
while (startspaces > 7) startspaces-=7;
startspaces = thisday - startspaces + 1;
if (startspaces < 0) startspaces+=7;
document.write(&quot;<table border=2 bgcolor=white &quot;);
document.write(&quot;bordercolor=black><font color=black>&quot;);
document.write(&quot;<tr><td colspan=7><center><strong>&quot;
+ monthnames[thismonth] + &quot; &quot; + thisyear
+ &quot;</strong></center></font></td></tr>&quot;);
document.write(&quot;<tr>&quot;);
document.write(&quot;<td align=center>Su</td>&quot;);
document.write(&quot;<td align=center>M</td>&quot;);
document.write(&quot;<td align=center>Tu</td>&quot;);
document.write(&quot;<td align=center>W</td>&quot;);
document.write(&quot;<td align=center>Th</td>&quot;);
document.write(&quot;<td align=center>F</td>&quot;);
document.write(&quot;<td align=center>Sa</td>&quot;);
document.write(&quot;</tr>&quot;);
document.write(&quot;<tr>&quot;);
for (s=0;s<startspaces;s++) {
document.write(&quot;<td> </td>&quot;);
}
count=1;
while (count <= monthdays[thismonth]) {
for (b = startspaces;b<7;b++) {
linktrue=false;
document.write(&quot;<td>&quot;);
for (c=0;c<linkdays.length;c++) {
if (linkdays[c] != null) {
if ((linkdays[c][0]==thismonth + 1) && (linkdays[c][1]==count)) {
document.write(&quot;<a href=\&quot;&quot; + linkdays[c][2] + &quot;\&quot;>&quot;);
linktrue=true;
}
}
}
if (count==thisdate) {
document.write(&quot;<font color='FF0000'><strong>&quot;);
}
if (count <= monthdays[thismonth]) {
document.write(count);
}
else {
document.write(&quot; &quot;);
}
if (count==thisdate) {
document.write(&quot;</strong></font>&quot;);
}
if (linktrue)
document.write(&quot;</a>&quot;);
document.write(&quot;</td>&quot;);
count++;
}
document.write(&quot;</tr>&quot;);
document.write(&quot;<tr>&quot;);
startspaces=0;
}
document.write(&quot;</table></p>&quot;);
// End -->
</script>

There's always a better way...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top