5 pts.
 Javascript calendar display works fine in IE7 & FF, but not in Opera.
I've been working with a calendar I found here that works well in Firefox & IE, but in Opera it stops filling in days when it gets to whatever today's date is. I'm not a javascript expert, but I was wondering if there is anything obvious I could do to get it working properly in Opera. I've cleaned up a number of minor/obvious things and have a better-looking slimmed-down one ... but that Opera thing seems strange. Thanks for any help.

Software/Hardware used:
ASKED: March 13, 2008  5:32 AM
UPDATED: July 2, 2008  8:27 PM

Answer Wiki:
This only took a couple of min. to track down, so ignore the other members' non-answers. They shouldn't get points for that. There seems to be a bug in Opera (might be fixed in 9.5) when using the Date constructor with 0: <pre>var lastDate = new Date(String(monthNum+1)+"/0/"+String(yearNum));</pre> In FF and IE this sets the date to the last day of the month, but in Opera it set the date to the next day, which is why it stops iteration after 2. It looks like you can fix this by replacing the instances of the above statement with this: <pre>var lastDate = new Date(String(monthNum+1)+"/1/"+String(yearNum)); lastDate.setDate(0);</pre> Apparently the setDate method in Opera works fine with 0.
Last Wiki Answer Submitted:  July 2, 2008  8:27 pm  by  Denny Cherry   64,520 pts.
All Answer Wiki Contributors:  Denny Cherry   64,520 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Mrdenny is correct. The software writer states that it is compatible with IE and Firefox. It doesn’t say anything about Opera. Even though java is supposed to be cross-platform independant that doesn’t mean that the writer made it that way. You would have to recode it yourself or talk with the original software developer to see if they will test it in opera and fix it.

 6,850 pts.