piyushkothari3 / jmonthcalendar

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

Using AJAX, calendar not drawing event when there's only 1 event for the month. #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  Have AJAX call return 1 event for month.
2.  Example "[{ 'EventID': 1, 'StartDateTime': '2009-06-11', 'Title':
'Test', 'URL': '#', 'Description': 'No Description yet', 'CssClass':
'Default'}]"
3.  Weird thing is, if hard coded events are added, single events appear. 
Example:  Download the demo project and remove all but 1 of event from var
events (line 71) and it works.  Have your AJAX call return the same event
data and it doesn't work.

What is the expected output? What do you see instead?
Events, 1 or many, should appear on calendar.

What version of the product are you using? On what operating system?
jmonthcalendar 1.22, jQuery 1.3.2, Win XP, IE 6&7/FF 3.10

Please provide any additional information below.
Fixed this by editing jMonthCalendar.js.   In jQuery.J.AddEvents section,
change value from 1 to 0.  Should look like this -->
if(eventCollection.length > 0) {

Original issue reported on code.google.com by aiden.so...@gmail.com on 11 Jun 2009 at 11:16

GoogleCodeExporter commented 8 years ago
That is an excellent catch, I should have seen that before.

Original comment by k.leneau@gmail.com on 15 Jun 2009 at 4:09