Closed Himanshupal0001 closed 2 years ago
@Himanshupal0001
The schedules
prop doesn't exist in the current version of the @toast-ui/react-calendar
.
You need to pass your schedules to the events
prop.
and the term Schedule
has been changed to the Event
. so your other props should be renamed.
Please refer to this guide and try again.
@adhrinae
Thanks a lot. It worked.
I am trying to build a task scheduler. I tried to use the schedule prop to render the schedule on the calendar. But unfortunately the schedules not rendering.
Code
// import Calender from '@toast-ui/react-calendar' // import 'tui-date-picker/dist/tui-date-picker.css'; // import 'tui-time-picker/dist/tui-time-picker.css'; // import './App.css'; // import '@toast-ui/calendar' import React, { useCallback, useRef } from 'react'; import Calendar from '@toast-ui/react-calendar';/ ES6 / //import "tui-calendar/dist/tui-calendar.css";
// If you use the default popups, use this. import 'tui-date-picker/dist/tui-date-picker.css'; import 'tui-time-picker/dist/tui-time-picker.css';
const start = new Date(); const end = new Date(new Date().setMinutes(start.getMinutes() + 30));
const schedules = [ { calendarId: "1", category: "time", isVisible: true, isPending: false, title: "Study", id: "1", body: "Test", start, end, }, { calendarId: "1", category: "time", isVisible: true, isPending: false, title: "Study", id: "1", body: "Test", start, end } ];
const calendars = [ { id: "1", name: "My Calendar", color: "#ffffff", bgColor: "#9e5fff", dragBgColor: "#9e5fff", borderColor: "#9e5fff" }, { id: "2", name: "Company", color: "#00a9ff", bgColor: "#00a9ff", dragBgColor: "#00a9ff", borderColor: "#00a9ff" } ];
function _Calendar(props) { const cal = useRef(null);
}
export default _Calendar;