In this article you will find default JavaScript definitions for all the supported templates.
Parameters:
Templates types list
The format for dates that are set by means of methods. Used to parse incoming dates.
Applicable views: all views
scheduler.templates.api_date = function(date){
return scheduler.date.str_to_date(scheduler.config.api_date);
};
The date in the header of the view.
Applicable views: day, units
scheduler.templates.day_date = function(date){
return scheduler.date.date_to_str(scheduler.config.default_date);
};
The date in the sub-header of the view.
Applicable views: day
scheduler.templates.day_scale_date = function(date){
return scheduler.date.date_to_str(scheduler.config.default_date);
};
The items of the Y-Axis.
Applicable views: day, week, units
scheduler.templates.hour_scale = function(date){
return scheduler.date.date_to_str(scheduler.config.hour_date);
};
The date in the header of the view.
Applicable views: month
scheduler.templates.month_date = function(date){
return scheduler.date.date_to_str(scheduler.config.month_date);
};
The format for the day in a cell.
Applicable views: month, year
scheduler.templates.month_day = function(date){
return scheduler.date.date_to_str(scheduler.config.month_day);
};
The name of the day in the week header of the view.
Applicable views: month
scheduler.templates.month_scale_date = function(date){
return scheduler.date.date_to_str(scheduler.config.week_date);
};
The date of the event in the Google Maps popup marker.
Applicable views: map
scheduler.templates.marker_date = function(date){
return scheduler.date.date_to_str("%Y-%m-%d %H:%i");
};
The drop-down time selector in the lightbox.
Applicable views: all views
scheduler.templates.time_picker = function(date){
return scheduler.date.date_to_str(scheduler.config.hour_date);
};
The items of the X-Axis.
Applicable views: timeline
scheduler.templates.timeline_scale_date = function(date){
return scheduler.date.date_to_str(obj.x_date||scheduler.config.hour_date);
};
The CSS style for items of the X-Axis.
Applicable views: timeline
scheduler.templates.timeline_scalex_class = function(date){
return "";
};
The items of the second X-Axis.
Applicable views: timeline
scheduler.templates.timeline_second_scale_date = function(date){
return scheduler.date.date_to_str((obj.second_scale && obj.second_scale.x_date)?obj.second_scale.x_date:scheduler.config.hour_date);
};
The CSS style for items of the second X-Axis.
Applicable views: timeline
scheduler.templates.timeline_second_scalex_class = function(date){
return "";
};
The date in the sub-header of the view.
Applicable views: week
scheduler.templates.week_scale_date = function(date){
return scheduler.date.date_to_str(scheduler.config.day_date);
};
A string from an file is converted into a date object in conformity with this template.
Applicable views: all views
scheduler.templates.xml_date = function(date){
return scheduler.date.str_to_date(scheduler.config.xml_date,scheduler.config.server_utc);
};
A date object is converted into a string in conformity with this template. Used to send data back to the server.
Applicable views: all views
scheduler.templates.xml_format = function(date){
return scheduler.date.date_to_str(scheduler.config.xml_date,scheduler.config.server_utc);
};
The date in the header of the view.
Applicable views: year
scheduler.templates.year_date = function(date){
return scheduler.date.date_to_str(scheduler.locale.labels.year_tab + " %Y")(date);
};
The name of a month in the header of a month block of the view.
Applicable views: year
scheduler.templates.year_month = function(date){
return scheduler.date.date_to_str("%F");
};
The name of a day in the sub-header of a month block of the view.
Applicable views: year
scheduler.templates.year_scale_date = function(date){
return scheduler.date.date_to_str("%D");
};
Parameters:
Templates types list
specifies the presentation of the 'View more' link in the cell of the Month view
Applicable views: month
scheduler.templates.month_events_link = function(date, count){
return "View more("+count+" events)";
};
Parameters:
Templates types list
The date in the header of the view.
Available views: week, weekAgenda
scheduler.templates.week_date = function(date1, date2){
return scheduler.templates.day_date(date1)+" – "+scheduler.templates.day_date(scheduler.date.add(date2,-1,"day"));
};
The date in the header of the view.
Available views: timeline
scheduler.templates.timeline_date = function(date1, date2){
if (date1.getDay()==date2.getDay() && date2-date1
Parameters:
Templates types list
The text in the second column of the view.
Applicable views: agenda
scheduler.templates.agenda_text = function(start,end,ev){
return ev.text;
};
The date in the first column of the view.
Applicable views: agenda
scheduler.templates.agenda_time = function(start,end,ev){
if (ev._timed)
return this.day_date(ev.start_date, ev.end_date, ev)+" "+this.event_date(start);
else
return scheduler.templates.day_date(start)+" – "+scheduler.templates.day_date(end);
};
The date of an event. Applied to one-day events.
Applicable views: month
scheduler.templates.event_bar_date = function(start,end,ev){
return scheduler.templates.event_date(start)+" ";
};
The text of an event. Applied to one-day events.
Applicable views: month
scheduler.templates.event_bar_text = function(start,end,ev){
return ev.text;
};
The CSS style for the event container.
Applicable views: day, month, week, year, units, timeline ('bar' and 'tree' modes)
scheduler.templates.event_class = function(start,end,ev){
return "";
};
The header of an event.
Applicable views: day, week, units
scheduler.templates.event_header = function(start,end,ev){
return scheduler.templates.event_date(start)+" - "+scheduler.templates.event_date(end);
};
The text of an event.
Available views: day, month, week, units
scheduler.templates.event_text = function(start,end,ev){
return ev.text;
};
The content of the pop-up edit form.
Available views: all views
scheduler.templates.quick_info_content = function(start, end, ev){
return ev.details || ev.text
};
The date of the pop-up edit form.
Available views: all views
scheduler.templates.quick_info_date = function(start, end, ev){
if (scheduler.is_one_day_event(ev))
return scheduler.templates.day_date(start, end, ev) + " " +scheduler.templates.event_header(start, end, ev);
else
return scheduler.templates.week_date(start, end, ev);
};
The title of the pop-up edit form.
Available views: all views
scheduler.templates.quick_info_title = function(start, end, ev){
return ev.text.substr(0,50);
};
The header of the lightbox.
Available views: all views
scheduler.templates.lightbox_header = function(start,end,ev){
return scheduler.templates.event_header(ev.start_date,ev.end_date,ev) + scheduler.templates.event_bar_text(ev.start_date,ev.end_date,ev);
};
The text in the second column of the view.
Available views: map
scheduler.templates.map_text = function(start,end,ev){
return ev.text;
};
The date in the first column of the view.
Available views: map
scheduler.templates.map_time = function(start,end,ev){
if (ev._timed)
return this.day_date(ev.start_date, ev.end_date, ev) + " " + this.event_date(start);
else
return scheduler.templates.day_date(start) + " – " + scheduler.templates.day_date(end);
};
The text of the event in the Google Maps popup marker.
Available views: map
scheduler.templates.marker_text = function(start,end,ev){
return "" + ev.text + "" + (ev.event_location || '') + "" + scheduler.templates.marker_date(start) + " - " + scheduler.templates.marker_date(end) + "";
};
The CSS style for a day cell.
Available views: month
scheduler.templates.month_date_class = function(start,end,ev){
return "";
};
The tooltip over a day cell containing some scheduled event(s).
Available views: timeline
scheduler.templates.timeline_tooltip = function(start,end,ev){
return ev.text;
};
The text of tooltips.
Available views: agenda, day, map, month, week, weekAgenda, units
scheduler.templates.tooltip_text = function(start,end,ev){
return "Event: "+ev.text+"Start date: "+scheduler.templates.tooltip_date_format(start)+"End date: "+scheduler.templates.tooltip_date_format(end);
};
The CSS style for a day cell.
Available views: week, units
scheduler.templates.week_date_class = function(start,end,ev){
return "";
};
The tooltip over a day cell containing some scheduled event(s).
Available views: year
scheduler.templates.year_tooltip = function(start,end,ev){
return ev.text;
};
Parameters:
Templates types list
The items of the Y-Axis.
Applicable views: timeline
scheduler.templates.timeline_scale_label = function(section_id, section_label, section_options){
return section_label;
};
The CSS style for items of the Y-Axis.
Applicable views: timeline
scheduler.templates.timeline_scaley_class = function(section_id, section_label, section_options){
return "";
};
Parameters:
Templates types list
The CSS style for a cell.
Available views: timeline (cell mode)
scheduler.templates.timeline_cell_class = function(evs, date, section){
return "";
};
The value presenting the number of scheduled events in a cell of the view.
Available views: timeline (cell mode)
scheduler.templates.timeline_cell_value = function(evs, date, section){
return evs?evs.length:"";
};