Fix calendar duplication bug

This commit makes sure the visual calendar has been cleared from the DOM
before refreshing it. This fixes the issue where the calendar would
duplicate itself every time a calendar's visibility was toggled (or in
any other occasion when the calendar needed to be reloaded).