AdelMoustafa / jmonthcalendar

Automatically exported from code.google.com/p/jmonthcalendar
Other
0 stars 0 forks source link

MonthNavigation is empty in Chrome and Safari #41

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Load basic calendar with default options.

What is the expected output? What do you see instead?
Expected output is the previous, next, today, and other navigation links above 
the calendar.

What version of the product are you using? On what operating system?
jMonthCalendar 1.3.2-beta2
jQuery 1.4.2
Mac OS X Snow Leapord

Please provide any additional information below.
Works fine in FF 3.6
Calendar does not appear in Chrome 5.0 and Safari 4.0.5 (not tested on IE).

The issue is in _initHeaders around line 223:

//Build up the Header first,  Navigation
var navRow = $('<tr><td colspan="7"><div class="FormHeader 
MonthNavigation"></div></td></tr>');
var navHead = $('.MonthNavigation', navRow);

The problem is that Chrome/Safari fails to find the div in the navRow context.

My work around was to use this code instead:

//Build up the Header first,  Navigation
var navRow = $('<tr><td colspan="7"></td></tr>');
var navHead = $("<div class=\"FormHeader MonthNavigation\"></div>");

Then, before the "// Days" comment a few lines down, I append navHead to the 
first cell in navRow:

navRow.find("td:first").append(navHead);

Viola, Chrome and Safari are now displaying the navigation correctly.

Original issue reported on code.google.com by tom.fern...@gmail.com on 28 Jul 2010 at 2:48