Fixed null reference error in calendar dayview