Fix for #280 : Move the array sort to calendar.setEvents so that it can refer to a proper static array