calendar view code clean