Skip to main content

⚙️ Calendar

PropTypeDefaultDescription
openbooleanfalseDetermines whether the calendar or picker is currently visible.
valueDate | Moment | nullnullThe currently selected date.
initialDateDate | Moment | nullnullThe date the calendar initially focuses on when rendered.
onSelect(date: Date | null) => voidCallback fired when a date is selected.
disablePortalbooleanfalseIf true, renders the calendar/popover inline instead of using a portal.
enableGoToTodaybooleanIf true, displays a button that navigates the calendar to today’s date.
hideFooterbooleanToggles visibility of the component’s footer.
disableLocaleDigitsbooleanForces numeric display to use English digits, even in locales like Arabic that default to locale-specific numerals (e.g. Hindi or Arabic-Indic).
renderGoToToday(onClick: () => void) => ReactNodeA function that returns a custom element for the “Go to Today” button. Receives an onClick handler to trigger the default behavior.
renderConfirmBtn(onClick: () => void) => ReactNodeA function that returns a custom element for the “OK” button. Receives an onClick handler to trigger the default behavior.
disabledDatesFn(date: Date) => booleanFunction to disable dates dynamically.
modepopover | inline"popover"Controls the calendar's display style: as a popover or inline element.
themelight | dark"light"Sets the calendar's color scheme to either light or dark mode.
initialView"day" | "month" | "year""day"Determines which view is shown when the calendar first loads.
views"day" | "month" | "year""day"Specifies which views users can switch between. Must include initialView.
anchorElHTMLElement | nullnullThe DOM element that serves as the anchor point for positioning the calendar.
position"top" | "right" | "bottom" | "left" | "start" | "end" | "top-right" | "top-left" | "top-start" | "top-end" | "bottom-right" | "bottom-left" | "bottom-start" | "bottom-end""bottom"Specifies the calendar's placement relative to the anchor element.
localestring"en"Moment.js locale (e.g. "ar", "ar-sa", "en-gb").
formatstring"YYYY/MM/DD"Specifies the format pattern used to display and interpret dates.
calendargregorian | hijri"gregorian"Specifies the calendar system used for date calculations and display.
onClose() => voidCallback invoked when the calendar is closed (e.g., clicking outside or selecting a date).
daysCalendarPropsDaysCalendarPropsAn object containing props that customize the rendering and behavior of the days calendar view.
monthsCalendarPropsMonthsCalendarPropsAn object containing props that customize the rendering and behavior of the months calendar view.
yearsCalendarPropsYearsCalendarPropsAn object containing props that customize the rendering and behavior of the years calendar view.
timePickerPropsTimePickerPropsAn object containing props that customize the rendering and behavior of the time picker.