Repair source code of CalendarController:
- Format
- Refactor
- Update sample.js