edit schedule button now work in calendar view

I just copied over code. Since it is being used in two places, we might
want to separate it out into a separate file and just include it.