Calendar
Calendars are modals for users to pick single dates, or the start and end of a date range. They are often used with date input.
Overview
There are two calendar variants: single date and date range.
In both variants, the current date is marked with a circle. The user can use arrows to navigate months, or manually select month and year using drop-downs.
On mobile, the component is a full-screen interaction.
Single date
Desktop

Mobile

Date range
Desktop

Mobile

Usage context
When to use
Use calendars to let users select single dates or date ranges that are no more than one year in the past or one year in the future.
When to use something else
For dates that are likely to be more than one year in the past or future, such as date of birth for an adult, use only the date input component without a calendar.
Usage guidelines
When date selection is in a filter, include both the date input and calendar components in the filtering modal.
In all other contexts, the calendar should be hidden unless opened by the user.

On desktop, when calendar is opened from the date input component, toggle the date input component within the calendar to off. This ensures the user doesn’t see two duplicate date inputs.


When using the month and year drop-downs, default to the device or browser’s native drop-down elements.
Custom element
Use the nyc-calendar custom element to instantiate a calendar
This code is for reference only. The library is currently in beta. Check back for future releases.
<nyc-calendar></nyc-calendar>
