function clearCalendar() {
  calendarInfo.innerText = '';
  let arr = document.querySelectorAll('.event');
  arr.forEach(element => {
    element.style.opacity = '0';
  });
  btnWeekAfter.disabled = true;
  btnWeekBefore.disabled = true;
  // Timeout for transition
  window.setTimeout(() => {
    arr.forEach(element => {
      element.parentElement.removeChild(element);
    })
    btnWeekAfter.disabled = false;
    btnWeekBefore.disabled = false;
  }, 500);
}
/**
 * Removes all events in the calendar
 */
Removes all events in the calendar
Removes all events in the calendar
function clearCalendar() {
  calendarInfo.innerText = '';
  let arr = document.querySelectorAll('.event');
  arr.forEach(element => {
    element.style.opacity = '0';
  });
  btnWeekAfter.disabled = true;
  btnWeekBefore.disabled = true;
  window.setTimeout(() => {
    arr.forEach(element => {
      element.parentElement.removeChild(element);
    })
    btnWeekAfter.disabled = false;
    btnWeekBefore.disabled = false;
  }, 500);
}
function clearCalendar ( ) { calendarInfo . innerText = '' ; let arr = document . querySelectorAll ( '.event' ) ; arr . forEach ( element => { element . style . opacity = '0' ; } ) ; btnWeekAfter . disabled = true ; btnWeekBefore . disabled = true ; window . setTimeout ( ( ) => { arr . forEach ( element => { element . parentElement . removeChild ( element ) ; } ) btnWeekAfter . disabled = false ; btnWeekBefore . disabled = false ; } , 500 ) ; }
Removes all events in the calendar
Removes all events in the calendar
// Timeout for transition
