kthornbloom/Monthly

How to reset calendar when clicking on a button

Closed this issue · 2 comments

Hello,

Is there a way to reset the calendar to a different date when different buttons are clicked?

Hi,

I think you'd do something like the below in your button click and then just recreate it?

$(document.body).off('click', '#mycalendar .monthly-next');
$(document.body).off('click', '#mycalendar .monthly-prev');
$(document.body).off('click', '#mycalendar .monthly-reset');
$(document.body).off('click', '#mycalendar .monthly-cal');
$(document.body).off('click', '#mycalendar a.monthly-day');
$(document.body).off('click', '#mycalendar .listed-event');
$('#mycalendar').html("");

@devlinhaines01 Awesome! Thank you!