Skip to content

Commit

Permalink
Fixed bug for events displaying on the wrong month
Browse files Browse the repository at this point in the history
  • Loading branch information
pmachapman committed Feb 9, 2017
1 parent a89a3d2 commit 854194e
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions js/monthly.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,16 @@ Monthly 2.2.0 by Kevin Thornbloom is licensed under a Creative Commons Attributi
}

function addEventsFromString(events, setMonth, setYear) {
if (options.dataType === "xml") {
$(events).find("event").each(function(index, event) {
addEvent(event, setMonth, setYear);
});
} else if (options.dataType === "json") {
$.each(events.monthly, function(index, event) {
addEvent(event, setMonth, setYear);
});
if ($(parent).data("setMonth") == setMonth && $(parent).data("setYear") == setYear) {
if (options.dataType === "xml") {
$(events).find("event").each(function(index, event) {
addEvent(event, setMonth, setYear);
});
} else if (options.dataType === "json") {
$.each(events.monthly, function(index, event) {
addEvent(event, setMonth, setYear);
});
}
}
}

Expand Down

0 comments on commit 854194e

Please sign in to comment.