[calendar_controller] bug fix and reformat