跳转到主要内容

event_text

Description

指定事件的文本

event_text: (start: Date, end: Date, event: any) => string

Parameters

  • start - (必填) Date - 事件计划开始的日期
  • end - (必填) Date - 事件计划结束的日期
  • event - (必填) object - 事件对象

Returns

  • text - (string) - 用于在 Scheduler 中呈现的 HTML 文本

Example

scheduler.templates.event_text = (start, end, event) => {
return `<a href='http://some.com/details.php?for=${event.id}'>${event.text}</a>`;
};

适用视图: 日视图, 周视图, 单元视图

Details

注意:对于 Month 和 Timeline 视图,您需要使用 event_bar_text 模板来指定事件的文本。

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.