JS outside eventByDay array