Fixed javascript exception when no events in month