Edit calender function.