Fix error (Cannot read property 'append' of undefined) on chrome when build the calendar