Fix js for calendar