angular - 如何在具有 Bootstrap 的 Angular 中正确格式化 FullCalendar?
问题描述
我已将 Bootstrap-4 应用于我的 Angular 项目。如何使用 Fullcalender 正确激活 themeSystem?
我相信这是因为我没有在 themeSystem 中正确使用 bootstrapPlugin。请用下面的代码告诉我我做错了什么。
import bootstrapPlugin from '@fullcalendar/bootstrap';
export class CalendarComponent implements OnInit {
constructor(public datesService: DatesService) { }
@ViewChild('calendar', { static: false }) calendarComponent: FullCalendarComponent; // the #calendar in the template
calendarVisible = true;
calendarPlugins = [dayGridPlugin, timeGrigPlugin, interactionPlugin, bootstrapPlugin];
calendarWeekends = true;
calendarEvents: EventInput[] = [];
themeSystem: 'bootstrap';
public dates: any;
ngOnInit() {
this.datesService.getDates()
.then(res => {
this.dates = res;
this.dates.forEach(d =>
this.calendarEvents = this.calendarEvents.concat({ 'title': d.projectName, 'start': new Date(d.liveDate) }))
})
}
}
日历上的格式看起来不像网上的几个例子。请告诉我。谢谢你。
解决方案
推荐阅读
- php - Laravel:获取除其中一些之外的所有列
- xslt - 在 XSL 模板中使用 .afm 和 .ttf 字体有什么区别?
- c# - 关于在文件夹和子文件夹中下载文件的问题
- javascript - Redux 状态更改后重新渲染组件不起作用?
- javascript - 'object HTMLParagraphElement' 第一次使用函数
- python - 在驱动器上写入二进制文件的最快方法
- sql - sql获取单行进行更新
- java - 尽管 POM 使用 Spring boot starter 5.XX,但 Java Spring Boot 项目仍导入 Spring Web/MVC 4.XX
- c++ - 为什么输出文件为空
- java - 如何在字节码中更新 IF_ICMPGE 的分支而不会出错