import { CCalendar } from '@coreui/react'
// or
import CCalendar from '@coreui/react/src/components/calendar/CCalendar'
PropertyDescriptionTypeDefault
calendarDateDefault date of the componentstring | DatestartDate
calendarsThe number of calendars that render on desktop devices.number1
classNameA string of all className you want applied to the component.string-
dayFormat
4.3.0+
Set the format of day name.'numeric' | '2-digit' | ((date: Date) => string | number)numeric
disabledDatesSpecify the list of dates that cannot be selected.Date[] | Date[][] | (Date | Date[])[]-
endDateInitial selected to date (range).string | Date-
firstDayOfWeekSets the day of start week.
- 0 - Sunday,
- 1 - Monday,
- 2 - Tuesday,
- 3 - Wednesday,
- 4 - Thursday,
- 5 - Friday,
- 6 - Saturday,
number1
localeSets the default locale for components. If not set, it is inherited from the browser.stringdefault
maxDateMax selectable date.string | Date-
minDateMin selectable date.string | Date-
navNextDoubleIconThe custom next double icon.ReactNode-
navNextIconThe custom next icon.ReactNode-
navPrevDoubleIconThe custom prev double icon.ReactNode-
navPrevIconThe custom prev icon.ReactNode-
navYearFirst
4.3.0+
Reorder year-month navigation, and render year first.boolean-
navigationShow arrows navigation.booleantrue
onCalendarDateChangeCallback fired when the calendar date changed.(date: Date) => void-
onDayHoverCallback fired when the user hovers over the calendar cell.(date: Date) => void-
onEndDateChangeCallback fired when the end date changed.(date: Date, formatedDate?: string) => void-
onSelectEndChangeCallback fired when the selection type changed.(value: boolean) => void-
onStartDateChangeCallback fired when the start date changed.(date: Date, formatedDate?: string) => void-
onViewChangedCallback fired when the view type of calendar changed.(view: string) => void-
rangeAllow range selection.boolean-
selectAdjacementDays
4.11.0+
Set whether days in adjacent months shown before or after the current month are selectable. This only applies if the showAdjacementDays option is set to true.booleanfalse
selectEndDateToggle select mode between start and end date.boolean-
showAdjacementDays
4.11.0+
Set whether to display dates in adjacent months (non-selectable) at the start and end of the current month.booleantrue
startDateInitial selected date.string | Date-
weekdayFormatSet length or format of day name.number | 'long' | 'narrow' | 'short' | ((date: Date) => string | number)2
On this page