Hi.
Scheduler is working fine for all modern browsers but in firefox.
There I see following error in dhtmlxscheduler.js file
TypeError: this._els.dhx_multi_day is undefined
The way I code below:
[code]this.construct = function() {
scheduler.locale.labels.timeline_tab = ‘Day’;
scheduler.locale.labels.section_custom = ‘Section’;
scheduler.config.mark_now = false;
scheduler.config.details_on_create = true;
scheduler.config.details_on_dblclick = true;
scheduler.config.xml_date = ‘%Y-%n-%j %G:%i’;
scheduler.config.api_date="%Y-%n-%j %G:%i";
scheduler.config.drag_create = true;
scheduler.config.drag_highlight = true;
scheduler.config.drag_move = true;
scheduler.config.touch = true;
scheduler.config.touch_drag = 500;
scheduler.config.dblclick_create = false;
scheduler.config.drag_create = false;
// $('#scheduler-canvas').css('min-height', scheSections.length * 100);
var durations = {
day: 24 * 60 * 60 * 1000,
hour: 60 * 60 * 1000,
minute: 60 * 1000
};
var get_formatted_duration = function(start, end) {
var diff = end - start;
var days = Math.floor(diff / durations.day);
diff -= days * durations.day;
var hours = Math.floor(diff / durations.hour);
diff -= hours * durations.hour;
var minutes = Math.floor(diff / durations.minute);
var results = [];
if (days) results.push(days + ' days');
if (hours) results.push(hours + ' hours');
if (minutes) results.push(minutes + ' minutes');
return results.join(', ');
};
var resize_date_format = scheduler.date.date_to_str(scheduler.config.hour_date);
scheduler.templates.event_bar_text = function(start, end, event) {
var state = scheduler.getState();
if (state.drag_id == event.id) {
return resize_date_format(start) + ' - ' + resize_date_format(end) + ' (' + get_formatted_duration(start, end) + ')';
}
return event.text;
};
scheduler.createTimelineView({
name: 'timeline',
x_unit: 'minute',
x_date: '%i',
x_step: 15,
x_size: 48,
x_start: 0,
x_length:12 * 4,
y_unit: scheSections,
y_property: 'section_id',
second_scale:{
x_unit: 'hour',
x_date: '%g%a'
},
render:'bar',
event_dy: 'full'
});
scheduler.config.lightbox.sections = [
{name:'description', height:130, map_to:'text', type:'textarea' , focus:true},
{name:'custom', height:23, type:'select', options:scheSections, map_to:'section_id' },
{name:'time', height:72, type:'time', map_to:'auto'}
];
scheduler.init('scheduler-canvas', scheNow, 'week');
scheduler.parse(scheEvents, 'json');
scheduler.addMarkedTimespan({
start_date:new Date('2000/1/1'),
end_date:new Date(),
css:'sche-past-marker'
});
scheduler.addMarkedTimespan({
days:[0,6],
zones:'fullday',
css:'sche-weekend-marker'
});
scheduler.updateView();
scheduler.filter_month = function() {return scheduler.getState().mode != 'month'}
}[/code]
Please help