calendarClassName | Defines class name(s) that will be added along with "react-calendar" to the main React-Calendar <div> element. | - String:
"class1 class2" - Array of strings:
["class1", "class2 class3"]
|
clockClassName | Defines class name(s) that will be added along with "react-clock" to the main React-Calendar <div> element. | - String:
"class1 class2" - Array of strings:
["class1", "class2 class3"]
|
calendarIcon | Defines the content of the calendar button. | - String:
"Calendar" - React element:
<CalendarIcon />
|
calendarType | Defines which type of calendar should be used. Can be "US" or "ISO 8601". Defaults to "US" for "en-US" locale, "ISO 8601" to all the others. | "ISO 8601" |
className | Defines class name(s) that will be added along with "react-datetime-picker" to the main React-DateTime-Picker <div> element. | - String:
"class1 class2" - Array of strings:
["class1", "class2 class3"]
|
clearIcon | Defines the content of the clear button. | - String:
"Clear" - React element:
<ClearIcon />
|
isCalendarOpen | Defines whether the calendar should be opened. Defaults to false. | true |
isClockOpen | Defines whether the clock should be opened. Defaults to false. | true |
locale | Defines which locale should be used by the calendar. Can be any IETF language tag. Defaults to user's browser settings. | "hu-HU" |
maxDate | Defines maximum date that the user can select. Periods partially overlapped by maxDate will also be selectable, although react-datetime-picker will ensure that no later date is selected. | Date: new Date() |
maxDetail | Defines how detailed time picking shall be. Can be "hour", "minute" or "second". Defaults to "minute". | "second" |
minDate | Defines minimum date that the user can select. Periods partially overlapped by minDate will also be selectable, although react-datetime-picker will ensure that no earlier date is selected. | Date: new Date() |
minDetail | Defines the least detailed view that the user shall see. Can be "month", "year", "decade" or "century". Defaults to "century". | "century" |
nextLabel | Defines the content of the "next" button on the navigation pane. Defaults to "›". | - String:
"›" - React element:
<NextIcon />
|
next2Label | Defines the content of the "next on higher level" button on the navigation pane. Defaults to "»". | - String:
"»" - React element:
<DoubleNextIcon />
|
onChange | Function called when the user clicks an item on the most detailed view available. | (value) => alert('New date is: ', value) |
onClickDay | Function called when the user clicks a day on a calendar. | (value) => alert('Clicked day: ', value) |
onClickDecade | Function called when the user clicks a decade on a calendar. | (value) => alert('Clicked decade: ', value) |
onClickMonth | Function called when the user clicks a month on a calendar. | (value) => alert('Clicked month: ', value) |
onClickYear | Function called when the user clicks a year on a calendar. | (value) => alert('Clicked year: ', value) |
prevLabel | Defines the content of the "previous" button on the navigation pane. Defaults to "‹". | - String:
"‹" - React element:
<PreviousIcon />
|
prev2Label | Defines the content of the "previous on higher level" button on the navigation pane. Defaults to "«". | - String:
"«" - React element:
<DoublePreviousIcon />
|
returnValue | Defines which dates shall be passed by the calendar to the onChange function and onClick{Period} functions. Can be "start", "end" or "range". The latter will cause an array with start and end values to be passed. Defaults to "start". | "range" |
required | Defines whether date input should be required. Defaults to false. | true |
showNeighboringMonth | Defines whether days from previous or next month shall be rendered if the month doesn't start on the first day of the week or doesn't end on the last day of the week, respectively. Defaults to true. | false |
tileClassName | Defines class name(s) that will be applied to a given calendar item (day on month view, month on year view and so on). | - String:
"class1 class2" - Array of strings:
["class1", "class2 class3"] - Function:
({ date, view }) => view === 'month' && date.getDay() === 3 ? 'wednesday' : null
|
tileContent | Allows to render custom content within a given calendar item (day on month view, month on year view and so on). | - String:
"Sample" - React element:
<TileContent /> - Function:
({ date, view }) => view === 'month' && date.getDay() === 0 ? <p>It's Sunday!</p> : null
|
showWeekNumbers | Defines whether week numbers shall be shown at the left of MonthView or not. Defaults to false. | true |
value | Defines the value of the input. | - Date:
new Date() - An array of dates:
[new Date(2017, 0, 1), new Date(2017, 7, 1)]
|
view | Determines which calendar view shall be opened initially. Does not disable navigation. Can be "month", "year", "decade" or "century". Defaults to the most detailed view allowed. | "year" |