格式化标签、日期、样式
请查阅每个视图的链接,了解其支持的模板。
默认视图
扩展视图
- Agenda View Templates
- 그리드 뷰 템플릿
- Map View 템플릿
- 타임라인 뷰 템플릿
- WeekAgenda 뷰 템플릿
- Units View 템플릿
- Year View Templates
所有视图通用
指定模板
可以通过两种方式设置模板:通过代码或使用 HTML 标记。
通过代码指定模板
默认情况下,模板被定义为 JavaScript 函数,该函数接收事件对象或日期参数,并返回一个 HTML 字符串插入到布局中:
scheduler.templates.event_text="function(start," end, event){
return "<a href='http://some.com/details.php?for="+event.id+"'>"
+event.text+"</a>";
}
通过标记指定模板
另一种方式是使用 HTML 声明式地定义模板。此方法需要在页面中引入 html_templates 扩展。启用该扩展后,可以像这样指定模板:
<div class="template:event_text">
<a href='http://some.com/details.php?for="{event.id}"'>{event.text}<a>
</div>
完整的模板列表可在 API 文档 中查阅。
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.