Getting Date as paramater in scheduler.templates.week_unit_scale_text

Hi ,

I saw some posts previously for this thing that i want.
But it isn’t working with me, It always returns undefined.

I want date parameter in :-

scheduler.templates.week_unit_scale_text=function( key, label, unit, date ){
   console.log(date);
   return label;
}; 

Same result i need for

  • scheduler.templates.single_unit_scale_text
  • scheduler.templates.unit_scale_text

Here is a snippet for it.
http://snippet.dhtmlx.com/8ebcffbb5

Regards

Well walking through some its core code. I found a way to make it work by changing a 1 line of code.

File : dhtmlxscheduler._units.js
Line#: 25

Replaced or added an extra parameter ( s ) in the last
return e.templates[t+"_scale_text"](_.key,_.label,_)

Like this
return e.templates[ t+"_scale_text"](_.key,_.label,_,s)

Where ( s ) is the parameter for Date

So if there is any other way to do this without changing its core code.
Please let me know.

Regards

Hi,

Which Scheduler version do you use?
I checked the issue in the latest PRO version 5.3.2 and the issue doesn’t occur there.

v.4.3.25 is attached in the snippet system, and I agree that there is the issue. Probably you just need to upgrade version in your app.

Alright Thanks.
My version is 5.1