I have just taken the time to sort through the MX Calendar code in order to comply with W3C Validation. I figured I couldn't be the only one, so I wanted to post my changes for everyone to use.
The following files are the only ones that I changed:
- CAL.asp
- CAL_functions.inc.asp
- CAL_ViewBase.class.asp
- KT_functions.inc.asp
First we will deal with the ampersand URL operator which was not properly encoded.
In file CAL_functions.inc.asp, replace "&" with "&" at the following lines:
In the file CAL_ViewBase.class.asp, replace "&" with "&" at the following lines:
In the file KT_functions.inc.asp, replace "&" with "&" at the following lines:
Now that we have that taken care of, it is time to focus on getting rid of that extra <tr class="weeks_cal"></tr> that gets added onto the end of the last week. This applies to the nugget as well as the full calendar in month view.
In file CAP.asp, navigate to line 305:
If j mod 7 = 0 Then
Response.write "</tr><tr class=""weeks_cal"">"
End If
Now, replace the Response.write section so everything looks like this:
If j mod 7 = 0 Then
If j = 35 Then
'This ensures another row isn't written after the last day
Else
Response.write "</tr><tr class=""weeks_cal"">"
End If
End If
Repeat the same steps in CAL.asp at line 526.
After making the changes, I validated successfully in HTML 4.01 Transitional.