Configuration Options

All configuration options need to be set before calling .init .

Any date configuration command accepts the next elements: case ”%d”: return “\”+date.getDate()+\””;

  • %m - month as number;
  • %y - year as number ( 2 digits );
  • %Y - year as number ( 4 digits );
  • %D - abbreviated name of the day;
  • %l - full name of the day;
  • %M - abbreviated name of the month;
  • %F - full name of the month;
  • %h - hours (12);
  • %H - hours (24);
  • %i - minutes;
  • %a - am or pm;
  • %A - AM or PM.

Date Formats Used in Scheduler

  • scheduler.config.default_date - header of day and week views;

  • scheduler.config.month_date - header of month view;

  • scheduler.config.week_date - subheader, days of week in month view;

  • scheduler.config.day_date - subheader, day label in day and week views;

  • scheduler.config.hour_date - vertical scale for day and week views;

  • scheduler.config.month_date - each day block in month view;

  • scheduler.config.api_date - used to set dates in events using api methods.

Scales

  • scheduler.config.hour_size_px - height of 1 hour in pixels;
  • scheduler.config.time_step - minimal date size step in minutes;
  • scheduler.config.start_on_monday - if true week starts from Monday ( if false, week start from Sunday);
  • scheduler.config.first_hour - hour from which day and week scales start;
  • scheduler.config.last_hour - hour from which day and week scales end.

Control

  • scheduler.config.drag_resize - allows resizing events by dnd;
  • scheduler.config.drag_move - allows moving events by dnd;
  • scheduler.config.drag_create - allows creating new events by dnd;
  • scheduler.config.edit_on_create - shows form on new event creation;
  • scheduler.config.details_on_create - uses extended form on new event creation by drag;
  • scheduler.config.details_on_dblclick - uses extended form on event double-click.

Others

  • scheduler.config.server_utc - if enabled component will convert server side dates from utc to local timezone, and backward during data sending to server;
  • scheduler.config.positive_closing - if outside click occurs during form edit, then form will be saved and event will be updated.

Selection Menus

  • scheduler.config.icons_edit:[“icon_save”,”icon_cancel”] - this collection stores buttons which are visible in edit menu;
  • scheduler.config.icons_select:[“icon_details”,”icon_edit”,”icon_delete”] - this collection stores buttons which are visible in selection menu.

Details Form

scheduler.config.lightbox.sections - collection of elements, each of them is an object in the following format:

{name:“description”, height:200, map_to:“text”, type:“textarea” , focus:true}

  • name - name used to locate localization label;
  • height - height of edit area;
  • map_to - property of event, which will be used for editing;
  • type - type of editor;
  • focus - auto-focus on form showing.
	lightbox:{
		sections:[	{name:"description", height:200, map_to:"text", type:"textarea" , focus:true},
				{name:"time", height:72, type:"time", map_to:"auto"}	]
	}

Configuration Templates

Templates are formatting functions, normally you don't need to define anything, they will be auto-created according to default config. Custom templates need to be defined after calling scheduler.init.

Inner Templates

common date for string converters ( receives date object, returns string )

  • 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.hour_scale - y-scale on day and week views;
  • scheduler.templates.xml_date - str to date parser used to convert data from XML;
  • scheduler.templates.xml_format - date to str converter used to send data back to server;
  • scheduler.templates.api_date - template used for date in events.

Event Templates

each template from this group returns string and receives the next parameters.

  • start date;
  • end date;
  • event object.
  • event_header - defines text label in header of event ( date );
  • event_text - defines text in middle part of event ( text );
  • event_bar_date - defines date for event bars in month view;
  • event_bar_text - defines text for event bars in month view.

Localization

scheduler.locale={
	date:{
		month_full:["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
		month_short:["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
		day_full:["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
    	day_short:["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
    },
    labels:{
    	dhx_cal_today_button:"Today",
    	day_tab:"Day",
    	week_tab:"Week",
    	month_tab:"Month",
    	new_event:"New event",
	icon_save:"Save",
	icon_cancel:"Cancel",
	icon_details:"Details",
	icon_edit:"Edit",
	icon_delete:"Delete",
	confirm_closing:"",//Your changes will be lost, are your sure ?
	confirm_deleting:"Event will be deleted permanently, are you sure?",
	section_description:"Description",
	section_time:"Time period"
    }
}
  • If confirm_closing or confirm_deleting - related confirm dialog will not be shown at all ( auto-confirm );
  • section_{name} refers to the section inside details form, with name:{name};
  • new_event - default text of new event.