Custom label to be used by screen readers. When provided, an aria-label will be added to the element.
string
"a user friendly label for screen readers"
When using range, Whether the next date selection will affect the start or end bound of the range.
string
"start"
"end"
How to align along the cross axis when contained in a Box or along the column axis when contained in a Grid.
string
"start"
"center"
"end"
"stretch"
"baseline"
An array of two numbers indicating the limits on navigation in ISO8601 format.
array
["2018-09-01", "2018-12-31"]
Function that will be called to render each day.
function
'date' is a string containing an ISO8601 date for the day being rendered. 'day' is a number containing the day of the month being rendered. 'isInRange' is a boolean indicating whether the date is within a selected range of dates. 'isSelected' is a boolean indicating whether this date is selected.
({ date, day, isInRange, isSelected }) => {}
The selected date or array of dates in ISO8601 format.
string
"2018-10-16T12:22:00Z"
array
["2018-10-12", "2018-10-17"]
Multiple selected dates in ISO8601 format.
array["string"]
["2018-10-12", "2018-10-17"]
array[array["string"]]
Items that are an array indicate a range of dates.
[["2018-10-19", "2018-11-23"]]
Multiple dates in ISO8601 format that should not be selectable.
array["string"]
["2018-09-21", "2018-09-27"]
array[array["string"]]
Items that are an array indicate a range of dates.
[["2018-12-23", "2018-12-26"]]
If specified, the entire calendar header will be managed by the caller.
function
'onPreviousMonth' and 'onNextMonth' are callbacks that will tell the calendar to move between months. 'previousInBound' and 'nextInBound' are booleans that tell, when using 'bounds', if the current date is within that range. You can then use that to disable the previous and next buttons.
({ date: Date, locale: "en-US", onPreviousMonth: func, onNextMonth: func, previousInBound: bool, nextInBound: bool, }) => {}
The amount of margin around the component.
string
"none"
"xxsmall"
"xsmall"
"small"
"medium"
"large"
"xlarge"
object
Can be specified to distinguish horizontal margin, vertical margin, and margin on a particular side.
{ vertical: "...", horizontal: "...", top: "...", bottom: "...", left: "...", right: "..." }
Custom messages for Calendar. Used for accessibility by screen readers.
string
({ previous: "Moved to {date}", next: "Moved to {date}", })
Called with an ISO8601 date when the user navigates to a different month.
function
('2018-10-22T12:22:00Z') => {}
Called with an ISO8601 date when the user selects a day. For single select, make this the subsequent 'date' property value. For multiple select or ranges, toggle values in 'dates'. Not specifying this property makes the component read only.
function
('2018-10-22T12:22:00Z') => {}
Whether to automatically manage multiple date selection as a range. When the user clicks the first date, onSelect will be called with that date. When the user selects another date, onSelect will be called with an array of two dates.
boolean
true
false
string
If range = "array", then an array of dates will be returned even when the start or end date of the range is undefined.
"array"
Whether to show the days from the previous and next months.
boolean
true
false
string
'trim' limits adjacent days shown to rows containing days in the current month.
"trim"
At its core, the Calendar component is a regular <div> element. Thus, both DOM and React properties, methods, and events are accessible. To read up on all of the possible DOM attributes and types available for div elements, check out this MDN Web Documents page. To learn more about DOM events and methods, you can read more on the MDN Web Events documentation page.
Also, feel free to read about the types of React events available, or see how DOM attributes change in React. Working in tandem with Styled Components, you also have access to the as property.
Any additional background and color hover style for the Calendar day.
string
A hex, name, or rgb value.
"brand"
object
An object with a color for dark and light modes.
{ dark: "light-4", light: "dark-3" }
Any additional background and color selected style for the Calendar day.
string
A hex, name, or rgb value.
"brand"
object
An object with a color for dark and light modes.
{ dark: "light-4", light: "dark-3" }
Font weight for the selected date.
string
Any browser font-weight definition.
"normal"
"bold"
number
300
Any additional background and color hover style for the selected Calendar day.
string
A hex, name, or rgb value.
"brand"
object
An object with a color for dark and light modes.
{ dark: "light-4", light: "dark-3" }
Any additional color style for the day in range of Calendar.
string
A hex, name, or rgb value.
"brand"
Font weight for the days in range.
string
Any browser font-weight definition.
"normal"
"bold"
number
300
Any additional background and color hover style for the days in range.
string
A hex, name, or rgb value.
"brand"
object
An object with a color for dark and light modes.
{ dark: "light-4", light: "dark-3" }
Any additional style for the day of Calendar.
string
Any CSS.
css`color: 'blue'`
function
(props) => {}
Any additional style for the Calendar.
string
Any CSS.
css`color: 'blue'`
function
(props) => {}
The
calendar[size].title
should be used in place of this heading level used for the calendar.number
4
The icon to use for the previous month navigation control.
element
<Previous />
The icon to use for the next month navigation control when small.
element
<FormNext />
The icon to use for the previous month navigation control when small.
element
<FormPrevious />
The amount to round the corner of a day when small.
boolean
true
false
string
"xsmall"
"small"
"medium"
"large"
"xlarge"
"full"
"any CSS size"
object
{ size: "...", corner: "..." }
where corner could be:
"top"
"left"
"bottom"
"right"
"top-left"
"top-right"
"bottom-left"
"bottom-right"
The amount to round the corner of a day in range when small.
boolean
true
false
string
"xsmall"
"small"
"medium"
"large"
"xlarge"
"full"
"any CSS size"
object
{ size: "...", corner: "..." }
where corner could be:
"top"
"left"
"bottom"
"right"
"top-left"
"top-right"
"bottom-left"
"bottom-right"
The amount to round the corner of a day in range when small.
boolean
true
false
string
"xsmall"
"small"
"medium"
"large"
"xlarge"
"full"
"any CSS size"
object
{ size: "...", corner: "..." }
where corner could be:
"top"
"left"
"bottom"
"right"
"top-left"
"top-right"
"bottom-left"
"bottom-right"
The amount to round the corner of a day in range when small.
boolean
true
false
string
"xsmall"
"small"
"medium"
"large"
"xlarge"
"full"
"any CSS size"
object
{ size: "...", corner: "..." }
where corner could be:
"top"
"left"
"bottom"
"right"
"top-left"
"top-right"
"bottom-left"
"bottom-right"
The amount to round the corner of a day when medium.
boolean
true
false
string
"xsmall"
"small"
"medium"
"large"
"xlarge"
"full"
"any CSS size"
object
{ size: "...", corner: "..." }
where corner could be:
"top"
"left"
"bottom"
"right"
"top-left"
"top-right"
"bottom-left"
"bottom-right"
The amount to round the corner of a day in range when medium.
boolean
true
false
string
"xsmall"
"small"
"medium"
"large"
"xlarge"
"full"
"any CSS size"
object
{ size: "...", corner: "..." }
where corner could be:
"top"
"left"
"bottom"
"right"
"top-left"
"top-right"
"bottom-left"
"bottom-right"
The amount to round the corner of a day in range when medium.
boolean
true
false
string
"xsmall"
"small"
"medium"
"large"
"xlarge"
"full"
"any CSS size"
object
{ size: "...", corner: "..." }
where corner could be:
"top"
"left"
"bottom"
"right"
"top-left"
"top-right"
"bottom-left"
"bottom-right"
The amount to round the corner of a day in range when medium.
boolean
true
false
string
"xsmall"
"small"
"medium"
"large"
"xlarge"
"full"
"any CSS size"
object
{ size: "...", corner: "..." }
where corner could be:
"top"
"left"
"bottom"
"right"
"top-left"
"top-right"
"bottom-left"
"bottom-right"
The amount to round the corner of a day when large.
boolean
true
false
string
"xsmall"
"small"
"medium"
"large"
"xlarge"
"full"
"any CSS size"
object
{ size: "...", corner: "..." }
where corner could be:
"top"
"left"
"bottom"
"right"
"top-left"
"top-right"
"bottom-left"
"bottom-right"
The amount to round the corner of a day in range when large.
boolean
true
false
string
"xsmall"
"small"
"medium"
"large"
"xlarge"
"full"
"any CSS size"
object
{ size: "...", corner: "..." }
where corner could be:
"top"
"left"
"bottom"
"right"
"top-left"
"top-right"
"bottom-left"
"bottom-right"
The amount to round the corner of a day in range when large.
boolean
true
false
string
"xsmall"
"small"
"medium"
"large"
"xlarge"
"full"
"any CSS size"
object
{ size: "...", corner: "..." }
where corner could be:
"top"
"left"
"bottom"
"right"
"top-left"
"top-right"
"bottom-left"
"bottom-right"
The amount to round the corner of a day in range when large.
boolean
true
false
string
"xsmall"
"small"
"medium"
"large"
"xlarge"
"full"
"any CSS size"
object
{ size: "...", corner: "..." }
where corner could be:
"top"
"left"
"bottom"
"right"
"top-left"
"top-right"
"bottom-left"
"bottom-right"
The color of a given icon.
string
A hex, name, or rgb value.
"black"
object
An object with a color for dark and light modes.
{ dark: #f8f8f8, light: #666666 }