make sure calendarData is defined