跳转到主要内容

renderEvent

Description

创建自定义事件框的HTML内容

renderEvent: (container: HTMLElement, event: any) => boolean

Parameters

  • container - (required) HTMLElement - 事件的容器元素
  • event - (required) object - 事件数据对象

Returns

  • display - (boolean) -
    • true - scheduler使用自定义表单
    • false - scheduler回退到默认表单

Example

scheduler.renderEvent = function(container, ev) {
var container_width = container.style.width;
var html = "<div className='dhx_event_move my_event_move' style='width:" +
+ container_width + "'></div>";
...
container.innerHTML = html;
return true;
}

Details

请注意,此方法仅适用于具有垂直刻度的视图,如Day视图或Week视图。

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.