Calendar popup showing before deferred promise resolved.

This is because currently the “Run Snippet then show custom Popup” Event Source On-Click Behavior for Calendars doesn’t check for a Deferred promise being returned, the way that the Action Framework does. Makes total sense that it would do this. I’ll mark it as an idea — this can probably make it into an upcoming patch release. I’ll keep you updated when this is implemented.