Added logic to CalenderPanel