Docs    Facebook    Customizations

Only show events from the next 30 days

Add this to the Custom JavaScript section to only show events from the next 30 days.

setTimeout(function(){
$('.cff-event').each(function(){
  var $event = $(this),
      event_date = $event.find('.cff-date > .cff-start-date k').text().trim().replace(',', ''),
      event_date_unix = parseInt((new Date(event_date).getTime() / 1000).toFixed(0)),
      var now = new Date();
  now.setDate(now.getDate() + 30);
  var oneMonthFromNow = (now.getTime() / 1000).toFixed(0);
  if( event_date_unix > oneMonthFromNow ) $event.hide();
});
}, 100);

Technical Support

Still have questions? We are here to help you succeed.

Open a support ticket