weekview => icon in column header

Hi.

I would like to have additional functionality in the header of columns.
More precisely I would like a custom link/icon next to the day’s datestring.
One way to archive this might be to set

  scheduler.templates.week_scale_date=function(date){
     return date+' <a href="javascript:someFunc(\''+date+'\')">click</a>';
  }

But there might be a better solution?

The idea is to have some functionality there that calls a function with the days date as a parameter.

regards,
Gerrit

Hello,

I believe you solution is quite ok.

As another option — we have ‘Active links’ extension which converts all dates in the scales to active links which lead to the selected day in the scheduler’s ‘day’ mode.

You can use this extension but redefine onclick logic.

  1. Find sources\ext\ext_active_links.js file.
  2. Attach it to your page:
<script src="../../sources/ext/ext_active_links.js" type="text/javascript" charset="utf-8"></script>

for example.
3. Edit it:

dhtmlxEvent(this._obj,"click",function(e){ var start = e.target || event.srcElement; var to = start.getAttribute("jump_to"); if (to) { // add your custom logic here } })

Hope this helps.

Best regards,
Ilya