Calendar is a stateless component which renders a standard calendar month. It accepts a limited amount of props, and is the foundation of our more useful
Calendar shares many of the same props as
InputDate. Please view those docs for interactive examples. But if you wish to use Calendar to build fully custom experiences, the following props are available for you:
|size||One of: |
|showNextButton||One of: |
|showPreviousButton||One of: |
We support three sizes:
medium (default), and
large. The font and grid are sized accordingly.
We support four different callbacks to hook into various navigation events:
onNextClick: the user clicked the right arrow
onPrevClick: the user clicked the right arrow
onNowClick: the user clicked the month label to return to the current month
onMonthChange: the user navigated to a new month (could be through any mouse or keyboard interaction)
For localization purposes,
Calendar accepts a localization object to pass transated month/weekday names and the standard first-day-of-the-week.