Callbacks not firing
I'm having an issue with callbacks not working, and I can't for the life of me figure out why.
I'm using the code along with wordpress events manager as follows :
jQuery('.responsive-calendar').responsiveCalendar({
events: {
<?php if (class_exists('EM_Events')) {
echo EM_Events::output(array(
'orderby'=>'start_date',
'scope'=>'all',
'format'=>'"#_{Y-m-d}": {
"number": "1",
"url": "#_EVENTURL",
"dayEvents": [
{
"name": "#_EVENTNAME",
"starttime": "#_24HSTARTTIME",
"endtime": "#_24HENDTIME"
},
]
},') );
} ?>
},
onActiveDayClick: function(events) {
alert('Active click');
},
onDayClick: function(events) {
alert('Day click');
}
});
});
The EM_Events::output call is working fine and successfully populating the calendar with the events, but the callbacks aren't having any effect. None-active days do nothing (no errors reported in the console), and active days the URL takes hold and the new page loads.
Please advise, especially if I'm doing something stupid.
Cheers
Andy
Comments (5)
-
-
repo owner I will look into this hopefully today. Thanks for the input!
-
repo owner Hi, I've checked the issue and everything seems to be just fine.
See: http://w3widgets.com/help/responsive-calendar/issue.24/example/ where day events are running properly.
@ge0rgi You don't have to setup time, it will automaticaly assume current month.
-
Well this is strange. I do not know why it is not working for me. I am using exactly the code I posted above and I do not see nothing wrong with it. Its is also not much different from yours. I soled it by checking if the day has active class in the onDayClick event.
-
repo owner - changed status to resolved
- Log in to comment
I am having a similar problem with active events: none of the active events are working: