I'm having problem with the homepage calendar.
Here is an link - http://clontarf.girlsacademy.com.au/
What I what to do is - When the user clicks the date on the calendar, the page will go to the events page (go to news/events tab, scroll down to see the heading called "Events" under the test).
Below javascript pointing to the wrong link. How can I fix the javascript so it points to the correct link?
function showEvents(date) {
rtn = "";
for (var i = 1; i < events.length; i++)
if(1900+date.getYear()==events[i][2] && 1+date.getMonth()==events[i][3] && date.getDate()==events[i][4])
rtn += events[i][1]+", \r\n";
if(rtn == "") return [false, "", ""];
return [true, '',rtn];
}
function callEvent(dateText, inst) {
dateText2 = dateText.split("/"); dateText2 = dateText2[2]+"-"+dateText2[0]+"-"+dateText2[1];
document.location.href="Event-OnDate-"+dateText2+".html";
}
$( "#datepicker" ).datepicker({
beforeShowDay: showEvents,
onSelect: callEvent
});
Any help would be appreciated?
Cheers
Paul