Calendar
A simple Calendar input for selecting individual dates.
#
Keyboard ShortcutsCalendar implements many keyboard shortcuts for power or keyboard only users.
#
APIautoFocus#
Pass focus to the Calendar when it mounts.
bordered#
true
culture#
Set the culture of the Calendar, passed to the configured localizer.
currentDate#
Default current date at which the calendar opens. If none is provided, opens at today's date or the value
date (if any).
defaultCurrentDate#
defaultValue#
defaultView#
views[0]
disabled#
footer#
A formatter for the Calendar footer, formats today's Date as a string.
@example ['dateFormat', ['footerFormat', "{ date: 'medium' }", "date => 'Today is: ' + formatter(date)"]]
formats#
max#
The maximum date that the Calendar can navigate to.
new Date(2099, 11, 31)
messages#
Object hash containing display text and/or text for screen readers.
Use the messages
object to localize widget text or provide custom rendering.
min#
The minimum date that the Calendar can navigate from.
new Date(1900, 0, 1)
navigateNextIcon#
Specify the navigate into the future header icon
navigatePrevIcon#
Specify the navigate into the past header icon
onChange#
A callback fired when the current value
changes.
onCurrentDateChange#
Change event Handler that is called when the currentDate is changed. The handler is called with the currentDate object.
onKeyDown#
The native onKeyDown
event, called preventDefault
will prevent any custom behavior, included keyboard shortcuts.
onNavigate#
Callback fired when the Calendar navigates between views, or forward and backwards in time.
onViewChange#
A callback fired when the view
changes.
readOnly#
Controls the read-only state of the Calendar.
renderDay#
Provide a custom component to render the days of the month. The Component is provided the following props
date
: aDate
object for the day of the month to renderlabel
: a formattedstring
of the date to render. To adjust the format of thelabel
string use thedateFormat
prop, listed below.
value#
The selected Date.
view#
Controls the currently displayed calendar view. Use defaultView
to set a unique starting view.
views#
Defines a list of views the Calendar can traverse through, starting with the first in the list to the last.
['month', 'year', 'decade', 'century']