Fix calendar generation and display