edit calendar func