Initial commit
This commit is contained in:
52
src/components/Calendars/EventCalendar.js
Normal file
52
src/components/Calendars/EventCalendar.js
Normal file
@@ -0,0 +1,52 @@
|
||||
/*!
|
||||
|
||||
=========================================================
|
||||
* Argon Dashboard Chakra PRO - v1.0.0
|
||||
=========================================================
|
||||
|
||||
* Product Page: https://www.creative-tim.com/product/argon-dashboard-chakra-pro
|
||||
* Copyright 2022 Creative Tim (https://www.creative-tim.com/)
|
||||
|
||||
* Designed and Coded by Simmmple & Creative Tim
|
||||
|
||||
=========================================================
|
||||
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import FullCalendar from '@fullcalendar/react'; // must go before plugins
|
||||
import dayGridPlugin from '@fullcalendar/daygrid'; // a plugin!
|
||||
import interactionPlugin from '@fullcalendar/interaction'; // needed for dayClick
|
||||
|
||||
function EventCalendar(props) {
|
||||
const {
|
||||
calendarData,
|
||||
initialDate,
|
||||
onDateClick,
|
||||
onEventClick,
|
||||
contentHeight = 'auto',
|
||||
height = '100%',
|
||||
dayMaxEvents = true,
|
||||
headerToolbar = false,
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<FullCalendar
|
||||
plugins={[dayGridPlugin, interactionPlugin]}
|
||||
headerToolbar={headerToolbar}
|
||||
initialView='dayGridMonth'
|
||||
initialDate={initialDate}
|
||||
contentHeight={contentHeight}
|
||||
height={height}
|
||||
dayMaxEvents={dayMaxEvents}
|
||||
events={calendarData}
|
||||
editable={true}
|
||||
dateClick={onDateClick}
|
||||
eventClick={onEventClick}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default EventCalendar;
|
||||
Reference in New Issue
Block a user