I think it's cause the month is just being added with no consideration for what the value becomes. Try putting in a conditional statement in. This is example code not functioning code (i think).
Code:
<script type="text/javascript">
var todaydate=new Date()
var curmonth=todaydate.getMonth()+1 //get current month (1-12)
var curyear=todaydate.getFullYear() //get current year
</script>
<table border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="33%">
<script>
document.write(buildCal(curmonth-1 ,curyear, "main", "month", "daysofweek", "days", 1));
</script></td>
<td width="33%">
<script>
document.write(buildCal(curmonth ,curyear, "main", "month", "daysofweek", "days", 1));
</script></td>
<td width="34%">
<script>
if (curmonth +1 > 12) {
curmonth = curmonth - 12;
curyear = curyear + 1;
}
document.write(curmonth+1 ,curyear, "main", "month", "daysofweek", "days", 1);
</script></td>
</tr>
</table>
Bookmarks