Hi,
When using the flat skin scheduler.config.hour_date does not seems to work anymore.
Here’s a snippet docs.dhtmlx.com/scheduler/snippet/ead1ee53
Regards,
Hi,
When using the flat skin scheduler.config.hour_date does not seems to work anymore.
Here’s a snippet docs.dhtmlx.com/scheduler/snippet/ead1ee53
Regards,
Hello,
Scheduler.config.hour_date works correctly with flat skin, please check the link below:
snippet.dhtmlx.com/a362f5c8d
At the snippet you send hour_date wat set in another way and you can’t change it.
Replace the default css with the flat skin ‘//cdn.dhtmlx.com/scheduler/edge/dhtmlxscheduler_flat.css’
snippet.dhtmlx.com/25fed5853
You are right.
To redefine hour date format with flat skin you need to change hour_scale template using onTemplatesReady event:
snippet.dhtmlx.com/0aa038e79
Yeah nah does not work either.
scheduler.xy.scale_height and scheduler.templates.hour_scale are actually overrided whatever if the user has configured them or not.
See the function scheduler._skin_init :
if (scheduler.skin === "flat"){
scheduler.xy.scale_height = 35;
scheduler.templates.hour_scale = function(date){
var min = date.getMinutes();
min = min < 10 ? "0"+min : min;
var html = "<span class='dhx_scale_h'>"+ date.getHours() +"</span>"+
"<span class='dhx_scale_m'> "+ min +"</span>";
return html;
};
}
Noticed that I was already setting scheduler.templates.hour_scale in my implementation.
Didn’t see you used onTemplatesReady sorry.
Meh it kinda works I guess but that’s messy and a bit too much code so
scheduler.config.hour_date = "%H:%i";
works.
I’ll have actually to rebuild the whole hour_date support with onTemplatesReady if I want it to works on falt skin…