Templates are formatting functions, normally you don't need to define anything, they will be auto-created according to default settings_config. But if you want to change how some elements of scheduler is rendered - this is the way.
Some samples of templates usage, can be checked at custom styling article
Templates from this group receives only one parameter - date which need to be formatted. The xml_format is backward template, it converts string to date.
var format = scheduler.date.date_to_str("%H:%i");
scheduler.templates.hour_scale=function(date){
return format(date);
}
scheduler.templates.day_date - date in header of day view;
scheduler.templates.week_date - date in header of week view;
scheduler.templates.month_date - date in header of month view;
scheduler.templates.day_scale_date - date in sub-header of day view;
scheduler.templates.week_scale_date - date in sub-header of week view;
scheduler.templates.month_scale_date - days of week on month view;
scheduler.templates.month_day - date in header of cell in month view;
scheduler.templates.hour_scale - y-scale on day and week views;
scheduler.templates.time_picker - date at the select box from description window;
Template from this group are used to format data of events. They are returns string and receives the next parameters.
start date;
end date;
event object
scheduler.templates.event_text=function(start,end,event){
return "Text:<b> "+event.text+"</b><br>"+"Descr."+event.details;
}
scheduler.templates.event_header - defines text label in header of event (date);
scheduler.templates.event_text - defines text in middle part of event (text);
scheduler.templates.event_bar_date - defines date for event bars in month view;
scheduler.templates.event_bar_text - defines text for event bars in month view.
scheduler.templates.lightbox_header - defines top line of lightbox window.
Template which controls css styling of some element. The string, returned from the template, will be uses as css class for related element.
scheduler.templates.event_class - css class of the event ( incoming parameters are the same as for Event Templates )
scheduler.templates.month_date_class - css class of day block in month view ( incoming parameters are the same as for Date Templates )
scheduler.templates.week_date_class - css class of day block in week view ( incoming parameters are the same as for Date Templates )
scheduler.templates.year_month - label of month in a year view
scheduler.templates.year_date - date of date in a year view
scheduler.templates.year_scale_date - label of week scale in a year view
{timeline} need to be replaced with name of timeline mode ( if you not sure what is the name - just remove curl brackets )
scheduler.templates.{timeline}_scale_date - value in the x-scale
scheduler.templates.{timeline}_scale_label - value in the y-scale
scheduler.templates.{timeline}_scalex_class - css in the x-scale
scheduler.templates.{timeline}_scaley_class - css in the y-scale
scheduler.templates.map_time - time part of events table
scheduler.templates.map_text - text part of events table
scheduler.templates.marker_text - text in the marker info window
scheduler.templates.marker_date - dates in the marker info window