molahs
September 23, 2014, 1:12pm
#1
Hi,
I would like to show in the Units view the day of the week after the date, which is showing in the middle of the screen.
I tried adding:
scheduler.templates.unit_date = function(date){
return scheduler.templates.day_date(date) + ' ' + scheduler.date.date_to_str(scheduler.config.week_date);
};
But this doesn’t seem to work.
Anyone has an idea on how to do it?
SergeM
October 1, 2014, 6:51am
#2
Hi,
the scheduler has the same “day_date” for Day and Unit view.
Also, this “day_date” template is used in the Week view. So to get the correct behavior:
scheduler.templates.day_date = function(date){
var spec = ( scheduler.getState().mode == "unit" ? "%d %M %Y %D" : scheduler.config.default_date );
var formatFunc = scheduler.date.date_to_str(spec);
return formatFunc(date);
};
docs.dhtmlx.com/scheduler/settings_format.html
docs.dhtmlx.com/scheduler/api__s … plate.html
molahs
October 9, 2014, 1:33pm
#3
awesome. that worked.
Thank you!