Props

React Lightweight Calendar Props

The following props are available for React Lightweight Calenar Component:



AttributeTypeDescriptionDefaultPossible ValuesAdditional Information
dataarrayAn array of item objects for the calendar-Array of item objectsEach item object should have the specified properties: id, startTime, endTime, title, bgColor, textColor.
currentViewstringA string indicating the current view of the calendarMONTHWEEK_TIME, DAY, MONTH, WEEK, WEEK_IN_PLACE, DAY_IN_PLACE-
currentDatestringThe current date displayed on the calendar in 'YYYY-MM-DD' formatnow (current date)String representing date in 'YYYY-MM-DD' format-
setCurrentDatefunctionA callback function that is called when the current date is changedNavigation not visible if not providedFunctionIt receives the new date as a parameter.
activeTimeDateFieldstringThe field based on which the elements will be positioned on the calendar-String representing time/date fieldIt can be any time date field from the data array or an interval separated by a '-'. (startTime, endTime, createdAt, updatedAt, startTime-endTime, createdAt-updated...)
weekStartsOnnumberA number that regulates which day the week starts on (0 to 6, where 0 represents Sunday, 1 represents Monday, and so on)-Integer (0 to 6)0 represents Sunday, 1 represents Monday, and so on.
renderItemfunctionA callback function for custom rendering of each element-FunctionIt receives the item data and a boolean indicating if the element is currently being hovered over.
renderItemTextfunctionA callback function for custom rendering of the text content of each element-FunctionIt receives the item data.
renderHeaderItemfunctionA callback function for custom rendering of the header element in the WEEK_TIME and DAY views-FunctionIt receives the header item data and additional information about the element's position.
renderHeaderItemTextfunctionA callback function for custom rendering of the text content of the header element in the WEEK_TIME and DAY views-FunctionIt receives the header item data.
disableHoverEffectbooleanA boolean value that determines whether a 'hovered' class name will be added to each hovered elementfalsetrue, false-
colorDotsarrayAn array of color dot objects that can be used to mark specific dates on the calendar-Array of color dot objectsEach color dot object should have properties: color, text, date.
timeDateFormatobjectAn object that defines the format of time units displayed on the calendar-Object with properties: day, hour, monthYear-
onDayNumberClickfunctionA callback function that is called when a day number is clicked-FunctionIt receives the clicked day and event as a parameter.
onDayStringClickfunctionA callback function that is called when a day text is clicked-FunctionIt receives the clicked day and event as a parameter.
onHourClickfunctionA callback function that is called when an hour on the left side of the calendar is clicked-FunctionIt receives the clicked hour and event as a parameter.
onColorDotClickfunctionA callback function that is called when a color dot is clicked-FunctionIt receives the clicked color dot information and event as a parameter.
onItemClickfunctionA callback function that is called when an item is clicked-FunctionIt receives the clicked item data and event as a parameter.
onCellClickfunctionA callback function that is called when a cell on the calendar is clicked-FunctionIt receives the clicked cell date information and event as a parameter.
onCellHeaderClickfunctionA callback function that is called when a cell header is clicked-FunctionIt receives the clicked cell date information and event as a parameter. It is the part to the left and right of the day number within a cell. In the case of MONTH and WEEK views, onCellClick method will be called instead of this one.
cellDisplayModeobjectAn object that controls the display mode of the cells in the calendar-Object with properties: [CURRENT_VIEW], inactiveCells, state-