Apparently this matters: the calendar script or its import must be in the *bottom_scripts* block within the templates.