calendar: improved panel and popup mode