Fix calendar styling and behaviour

See #2245