diff --git a/lazy-timer-fe/src/pages/Charts/Calendar.jsx b/lazy-timer-fe/src/pages/Charts/Calendar.jsx new file mode 100644 index 0000000..ac202e9 --- /dev/null +++ b/lazy-timer-fe/src/pages/Charts/Calendar.jsx @@ -0,0 +1,50 @@ +import React, { useState } from 'react' +import { ScheduleComponent, ViewsDirective, ViewDirective, Day, Week, WorkWeek, Month, Agenda, Inject, Resize, DragAndDrop } from '@syncfusion/ej2-react-schedule' +import { DatePickerComponent } from '@syncfusion/ej2-react-calendars' + +import { scheduleData } from '../data/dummy' +import { Header } from '../components' + +// eslint-disable-next-line react/destructuring-assignment +const PropertyPane = props =>
{props.children}
+ +const Scheduler = () => { + const [scheduleObj, setScheduleObj] = useState() + + const change = args => { + scheduleObj.selectedDate = args.value + scheduleObj.dataBind() + } + + const onDragStart = arg => { + // eslint-disable-next-line no-param-reassign + arg.navigation.enable = true + } + + return ( +
+
+ setScheduleObj(schedule)} selectedDate={new Date(2021, 0, 10)} eventSettings={{ dataSource: scheduleData }} dragStart={onDragStart}> + + {['Day', 'Week', 'WorkWeek', 'Month', 'Agenda'].map(item => ( + + ))} + + + + + + + + + + +
+ +
+
+
+ ) +} + +export default Scheduler