@@ -2,32 +2,16 @@ import * as React from 'react';
22import './App.css' ;
33import * as DataSource from './datasource.json' ;
44
5- import { Inject , ScheduleComponent , Day , Week , WorkWeek , Month , Agenda ,
6- EventSettingsModel } from '@syncfusion/ej2-react-schedule' ;
5+ import { Inject , ScheduleComponent , Day , Week , WorkWeek , Month , Agenda } from '@syncfusion/ej2-react-schedule' ;
76
87class App extends React . Component {
9- private localData : EventSettingsModel = {
10- // dataSource: [{
11- // EndTime: new Date(2019, 0, 11, 6, 30),
12- // StartTime: new Date(2019, 0, 11, 4, 0),
13- // Subject: 'Testing',
14- // IsAllDay: true,
15- // RecurrenceRule: 'FREQ=DAILY;INTERVAL=1;COUNT=10'
16- // }],
17- dataSource : DataSource . scheduleData ,
18- fields : {
19- id : "Id" ,
20- subject : { name : 'Subject' } ,
21- startTime : { name : 'StartTime' } ,
22- endTime : { name : 'EndTime' } ,
23- location : { name : 'Location' }
24- }
25- } ;
8+ private schData : Object = DataSource . scheduleData ;
9+
2610 public render ( ) {
2711 return < ScheduleComponent currentView = 'Month' selectedDate = { new Date ( 2019 , 0 , 6 ) }
28- eventSettings = { this . localData } >
12+ eventSettings = { { dataSource : this . schData } } >
2913 < Inject services = { [ Day , Week , WorkWeek , Month , Agenda ] } />
3014 </ ScheduleComponent >
3115 }
3216} ;
33- export default App ;
17+ export default App ;
0 commit comments