As the code belongs to a project of the company I am working for, I can not post the full code, but I will provide an example of what I did:
first in the package.json I added...
Code: Select all
"fullcalendar": "^3.6.0",
"jquery": "^3.2.1"
then inside my component i plainly did the following...
Code: Select all
/* react and external libraries */
import React from 'react';
/* primereact components */
import {Schedule} from 'primereact/components/schedule/Schedule';
/* own containers and components */
import AbstractComponent from '../../components/AbstractComponent';
class ScheduleComponent extends AbstractComponent {
constructor(props) {
super(props);
this.state = {};
}
render() {
let events = [
{
"id": 1,
"title": "All Day Event",
"start": "2017-02-01"
},
{
"id": 2,
"title": "Long Event",
"start": "2017-02-07",
"end": "2017-02-10"
}
];
return (
<div id="scheduleComponentContent">
<Schedule events={events}></Schedule>
</div>
);
}
}
export default injectIntl(ScheduleComponent);
jQuery should be ok as I got a jQuery-error first cause I forgot to add the dependency in package.json. After adding that I get the type error. Also tried importing from fullcalendar, but either did that wrong or it didn't have any effect.