Repair source code of CalendarController: apply js template