Setting custom html for time header in react
6 years ago.
I'm trying to set a custom html for the time header. Trying to add a left and right arrow so I can go to previous and next month/week etc. But args.header.html in onBeforeTimeHeaderRender only outputs [object Object] if setting a react-html/jsx-object:
args.header.html = <div><i className={'fa fa-chevron-left'} style= onClick={()=>previous()}......
To output the correct html I can just set args.header.html to a html-string but my methods wont be able to execute.
I have also tried using ReactDOM.render:
let test = <div><i className={'fa fa-chevron-left'} onClick={()=>previous()}...
let realHtml = document.createElement("div");
ReactDOM.render(test, realHtml)
args.header.html = realHtml;
But that only outputs [object HTMLDivElement]
DayPilot