disabling buttons when appropriate in appointment boxes.