-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from kmkrish001/main
Updated react scheduler sample to latest version.
- Loading branch information
Showing
9 changed files
with
81 additions
and
28,464 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,10 @@ | ||
.App { | ||
text-align: center; | ||
} | ||
|
||
.App-logo { | ||
height: 40vmin; | ||
pointer-events: none; | ||
} | ||
|
||
@media (prefers-reduced-motion: no-preference) { | ||
.App-logo { | ||
animation: App-logo-spin infinite 20s linear; | ||
} | ||
} | ||
|
||
.App-header { | ||
background-color: #282c34; | ||
min-height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: calc(10px + 2vmin); | ||
color: white; | ||
} | ||
|
||
.App-link { | ||
color: #61dafb; | ||
} | ||
|
||
@keyframes App-logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
@import "../node_modules/@syncfusion/ej2-base/styles/bootstrap5.css"; | ||
@import "../node_modules/@syncfusion/ej2-buttons/styles/bootstrap5.css"; | ||
@import "../node_modules/@syncfusion/ej2-calendars/styles/bootstrap5.css"; | ||
@import "../node_modules/@syncfusion/ej2-dropdowns/styles/bootstrap5.css"; | ||
@import "../node_modules/@syncfusion/ej2-inputs/styles/bootstrap5.css"; | ||
@import "../node_modules/@syncfusion/ej2-lists/styles/bootstrap5.css"; | ||
@import "../node_modules/@syncfusion/ej2-navigations/styles/bootstrap5.css"; | ||
@import "../node_modules/@syncfusion/ej2-popups/styles/bootstrap5.css"; | ||
@import "../node_modules/@syncfusion/ej2-splitbuttons/styles/bootstrap5.css"; | ||
@import "../node_modules/@syncfusion/ej2-react-schedule/styles/bootstrap5.css"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,37 @@ | ||
import React from 'react'; | ||
import './App.css'; | ||
import { ScheduleComponent, Inject, Agenda, Day, Month, Week, WorkWeek, EventSettingsModel } from '@syncfusion/ej2-react-schedule'; | ||
import { DataManager,WebApiAdaptor } from '@syncfusion/ej2-data'; | ||
class App extends React.Component { | ||
private localData: EventSettingsModel = { | ||
dataSource: [{ | ||
EndTime: new Date(2019, 0, 11, 6, 30), | ||
StartTime: new Date(2019, 0, 11, 4, 0) | ||
}] | ||
}; | ||
private remoteData = new DataManager({ | ||
url: 'https://js.syncfusion.com/demos/ejservices/api/Schedule/LoadData', | ||
adaptor: new WebApiAdaptor, | ||
crossDomain: true | ||
}); | ||
|
||
|
||
render() { | ||
return ( | ||
<ScheduleComponent currentView='Month' | ||
eventSettings={{ dataSource: this.remoteData }} selectedDate={new Date(2017, 5, 5)} > | ||
<Inject services={[Day, Week, WorkWeek, Month, Agenda]} /> | ||
</ScheduleComponent> | ||
|
||
); | ||
} | ||
import { ScheduleComponent, Day, Week, WorkWeek, Month, Agenda, Inject } from '@syncfusion/ej2-react-schedule'; | ||
|
||
function App() { | ||
const data = [ | ||
{ | ||
Id: 1, | ||
Subject: 'Paris', | ||
StartTime: new Date(2023, 1, 15, 10, 0), | ||
EndTime: new Date(2023, 1, 15, 12, 30), | ||
}, | ||
{ | ||
Id: 2, | ||
Subject: 'Germany', | ||
StartTime: new Date(2023, 1, 17, 12, 0), | ||
EndTime: new Date(2023, 1, 17, 13, 30), | ||
}, | ||
{ | ||
Id: 3, | ||
Subject: 'England', | ||
StartTime: new Date(2023, 1, 13, 9, 0), | ||
EndTime: new Date(2023, 1, 13, 11, 0), | ||
}, | ||
]; | ||
|
||
const eventSettings = { dataSource: data } | ||
return ( | ||
<div className="App"> | ||
<ScheduleComponent height='550px' selectedDate={new Date(2023, 1, 15)} eventSettings={eventSettings}> | ||
<Inject services={[Day, Week, WorkWeek, Month, Agenda]} /> | ||
</ScheduleComponent> | ||
</div> | ||
); | ||
} | ||
|
||
|
||
export default App; | ||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,3 @@ code { | |
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', | ||
monospace; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/// <reference types="react-scripts" /> | ||
/// <reference types="react-scripts" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": [ | ||
"dom", | ||
"dom.iterable", | ||
"esnext" | ||
], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"noEmit": true, | ||
"jsx": "react-jsx" | ||
}, | ||
"include": [ | ||
"src" | ||
] | ||
} | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": [ | ||
"dom", | ||
"dom.iterable", | ||
"esnext" | ||
], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"noEmit": true, | ||
"jsx": "react-jsx" | ||
}, | ||
"include": [ | ||
"src" | ||
] | ||
} |