How to show weeknumber in scheduler month view


#1

I want to show the weeknumber in the first column of the month view of the scheduler.
How can I do that? See yellow line in below picture, there I want to show the week number.


#2

Hello @Klaas-Jan_de_Groote ,

You can do it with the month_day template:
https://docs.dhtmlx.com/scheduler/api__scheduler_month_day_template.html

It may look like follows:

scheduler.templates.month_day = function(date){
  var week = scheduler.date.getISOWeek(new Date(date));
  var dateToStr_func = scheduler.date.date_to_str(scheduler.config.month_day);
  if(new Date(date).getDay() == 1){
  	return `<div class="abs"><p>${week}</p></div> ${dateToStr_func(date)}`
  }
    return  dateToStr_func(date);
};

If you need an exact column with weeks, you can do it with additional CSS, here is an example(HTML/CODE tabs):
http://snippet.dhtmlx.com/5/cdc5190c1