TemplateTypes.Date

TemplateTypes.Date

Parameters:

  • date - the date which needs formatting.

DHXScheduler.Templates.api_date

The format for dates that are set by means of API 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);
};

DHXScheduler.Templates.day_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);
};

DHXScheduler.Templates.day_scale_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);
};

DHXScheduler.Templates.hour_scale

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);
};

DHXScheduler.Templates.month_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);
};

DHXScheduler.Templates.month_day

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);
};

DHXScheduler.Templates.month_scale_date

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);
};

DHXScheduler.Templates.marker_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"); 
};

DHXScheduler.Templates.time_picker

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);
};

DHXScheduler.Templates.timeline_scale_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);
};

DHXScheduler.Templates.timeline_scalex_class

The css style for items of the X-Axis.

Applicable views: timeline

scheduler.templates.timeline_scalex_class = function(date){
	return "";
};

DHXScheduler.Templates.timeline_second_scale_date

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);
};

DHXScheduler.Templates.timeline_second_scalex_class

The css style for items of the second X-Axis.

Applicable views: timeline

scheduler.templates.timeline_second_scalex_class = function(date){
	return "";
};

DHXScheduler.Templates.week_scale_date

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);
};

DHXScheduler.Templates.xml_date

A string from an XML 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);
};

DHXScheduler.Templates.xml_format

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);
};

DHXScheduler.Templates.year_date

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);
};

DHXScheduler.Templates.year_month

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");
};

DHXScheduler.Templates.year_scale_date

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");
};

comments powered by Disqus