import { CDateRangePicker } from '@coreui/react-pro'
// or
import CDateRangePicker from '@coreui/react-pro/src/components/date-range-picker/CDateRangePicker'
PropertyDescriptionTypeDefault
calendarDateDefault date of the componentstring | Date-
calendarsThe number of calendars that render on desktop devices.number2
cancelButtonToggle visibility or set the content of cancel button.ReactNodeCancel
cancelButtonColorSets the color context of the cancel button to one of CoreUI’s themed colors.'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | stringprimary
cancelButtonSizeSize the cancel button small or large.'sm' | 'lg'sm
cancelButtonVariantSet the cancel button variant to an outlined button or a ghost button.'outline' | 'ghost'ghost
classNameA string of all className you want applied to the component.string-
cleanerToggle visibility or set the content of the cleaner button.booleantrue
closeOnSelect
4.8.0+
If true the dropdown will be immediately closed after submitting the full date.booleantrue
confirmButtonToggle visibility or set the content of confirm button.ReactNodeOK
confirmButtonColorSets the color context of the confirm button to one of CoreUI’s themed colors.'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | stringprimary
confirmButtonSizeSize the confirm button small or large.'sm' | 'lg'sm
confirmButtonVariantSet the confirm button variant to an outlined button or a ghost button.'outline' | 'ghost'-
containerSet container type for the component.'dropdown' | 'inline'-
dayFormat
4.3.0+
Set the format of day name.'numeric' | '2-digit' | ((date: Date) => string | number)'numeric'
disabledToggle the disabled state for the component.boolean-
disabledDatesSpecify the list of dates that cannot be selected.Date[] | Date[][] | (Date | Date[])[]-
dropdownClassNamesA string of all className you want applied to the dropdown menu.string-
endDateInitial selected to date (range).string | Date-
feedback
4.2.0+
Provide valuable, actionable feedback.ReactNode-
feedbackInvalid
4.2.0+
Provide valuable, actionable feedback.ReactNode-
feedbackValid
4.2.0+
Provide valuable, actionable invalid feedback when using standard HTML form validation which applied two CSS pseudo-classes, :invalid and :valid.ReactNode-
firstDayOfWeekSets the day of start week.
- 0 - Sunday,
- 1 - Monday,
- 2 - Tuesday,
- 3 - Wednesday,
- 4 - Thursday,
- 5 - Friday,
- 6 - Saturday,
number1
floatingClassName
4.5.0+
A string of all className you want applied to the floating label wrapper.string-
footerToggle visibility of footer element or set the content of footer.ReactNode-
footerContentAdd custom elements to the footer.ReactNode-
formatSet date format.
We use date-fns to format dates. Visit https://date-fns.org/v2.28.0/docs/format to check accepted patterns.
string-
idThe id global attribute defines an identifier (ID) that must be unique in the whole document.

The name attributes for input elements are generated based on the id property:
- {id}-start-date
- {id}-end-date
string-
indicatorToggle visibility or set the content of the input indicator.ReactNodetrue
inputDateFormat
v4.14.0+
Custom function to format the selected date into a string according to a custom format.(date: Date) => string-
inputDateParse
v4.14.0+
Custom function to parse the input value into a valid Date object.(date: string | Date) => Date-
inputOnChangeDelay
v4.14.0+
Defines the delay (in milliseconds) for the input field's onChange event.number750
inputReadOnlyToggle the readonly state for the component.boolean-
invalidSet component validation state to invalid.boolean-
label
4.2.0+
Add a caption for a component.ReactNode-
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.boolean-
onEndDateChangeCallback fired when the end date changed.(date: Date, formatedDate?: string) => void-
onHideCallback fired when the component requests to be hidden.() => void-
onSelectEndChangeCallback fired when the selection type changed.(value: boolean) => void-
onShowCallback fired when the component requests to be shown.() => 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-
placeholderSpecifies short hints that are visible in start date and end date inputs.string | string[]['Start date', 'End date']
rangesPredefined date ranges the user can select from.object-
rangesButtonsColorSets the color context of the cancel button to one of CoreUI’s themed colors.'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | stringsecondary
rangesButtonsSizeSize the ranges button small or large.'sm' | 'lg'-
rangesButtonsVariantSet the ranges button variant to an outlined button or a ghost button.'outline' | 'ghost'ghost
required
4.10.0+
When present, it specifies that date must be filled out before submitting the form.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.boolean-
selectEndDateToggle select mode between start and end date.boolean-
separatorDefault icon or character character that separates two dates.ReactNodetrue
showAdjacementDays
4.11.0+
Set whether to display dates in adjacent months (non-selectable) at the start and end of the current month.boolean-
sizeSize the component small or large.'sm' | 'lg'-
startDateInitial selected date.string | Date-
text
4.2.0+
Add helper text to the component.ReactNode-
timepickerProvide an additional time selection by adding select boxes to choose times.boolean-
todayButtonToggle visibility or set the content of today button.ReactNodeToday
todayButtonColorSets the color context of the today button to one of CoreUI’s themed colors.'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | stringprimary
todayButtonSizeSize the today button small or large.'sm' | 'lg'sm
todayButtonVariantSet the today button variant to an outlined button or a ghost button.'outline' | 'ghost'-
togglerThe content of toggler.ReactNode-
tooltipFeedback
4.2.0+
Display validation feedback in a styled tooltip.boolean-
validSet component validation state to valid.boolean-
visibleToggle the visibility of dropdown menu component.boolean-
weekdayFormatSet length or format of day name.number | 'long' | 'narrow' | 'short' | ((date: Date) => string | number)2
On this page