📅  最后修改于: 2023-12-03 15:30:36.148000             🧑  作者: Mango
ej2-react-schedule
是一款功能强大的 Javascript 日历组件库,它可以帮助你快速构建漂亮、交互性强、高度自定义的日历功能模块,在企业级 Web 应用中得到广泛应用。
使用 npm 安装 ej2-react-schedule:
npm install @syncfusion/ej2-react-schedule --save
使用 React 导入
import {
ScheduleComponent,
Day,
Week,
Month,
Agenda,
Inject
} from "@syncfusion/ej2-react-schedule";
//...
render() {
return (
<ScheduleComponent currentView="Month">
<Inject services={[Day, Week, Month, Agenda]} />
</ScheduleComponent>
);
}
//...
import React, { Component } from 'react';
import { ScheduleComponent, Day, Week, Month, Agenda, Inject } from '@syncfusion/ej2-react-schedule';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<ScheduleComponent height="80vh" selectedDate={new Date(2022, 1, 15)} currentView="Month">
<Inject services={[Day, Week, Month, Agenda]} />
</ScheduleComponent>
</div>
);
}
}
export default App;
@import '~@syncfusion/ej2-base/styles/material.css';
@import '~@syncfusion/ej2-buttons/styles/material.css';
@import '~@syncfusion/ej2-calendars/styles/material.css';
@import '~@syncfusion/ej2-dropdowns/styles/material.css';
@import '~@syncfusion/ej2-inputs/styles/material.css';
@import '~@syncfusion/ej2-lists/styles/material.css';
@import '~@syncfusion/ej2-navigations/styles/material.css';
@import '~@syncfusion/ej2-popups/styles/material.css';
@import '~@syncfusion/ej2-react-schedule/styles/material.css';