Fix for calendar slow transition in modal mode