Various fixes for the calendar interface by @hplato

Ready for testing by others.