Timeline rendering issue

Hi

I’m creating a scheduler page with the following configuration .
but while loading its showing an error in console = >TypeError: e is undefined dhtmlxscheduler.js(line 1241, col 12).

but after resizing the page by Control+ or control- or after opening console panel , the scheduler page is rendering correctly .

//Function to construct scheduler
function init() {

    scheduler.locale.labels.timeline_tab = "Timeline";
    scheduler.locale.labels.section_custom = "Section";
    scheduler.config.details_on_create = true;
    scheduler.config.details_on_dblclick = true;
    scheduler.config.xml_date = "%Y-%m-%d %H:%i";

    //===============
    //Configuration
    //===============


    scheduler.createTimelineView({
        name: "timeline",
        x_unit: "minute",
        x_date: "%H:%i",
        x_step: 30,
        x_size: 24,
        x_start: 16,
        render: "days",
        days: 18
    });

    var view_name = 'timeline';
    scheduler.attachEvent("onBeforeViewChange", function(old_mode, old_date, mode, date) {
        var year = date.getFullYear();
        var month = (date.getMonth() + 1);
        var d = new Date(year, month, 0);

        scheduler.matrix[view_name].days = d.getDate();//numbers of day in month;
        return true;
    });
    scheduler.date['add_' + view_name] = function(date, step) {
        if (step > 0) {
            step = 1;
        } else if (step < 0) {
            step = -1;
        }
        return scheduler.date.add(date, step, "month")
    };

    scheduler.date[view_name + "_start"] = function(date) {
        var view = scheduler.matrix.timeline;
        date = scheduler.date.month_start(date);
        date = scheduler.date.add(date, view.x_step * view.x_start, view.x_unit);
        return date;
    };

    scheduler.attachEvent("onYScaleClick", function(index, section, e) {
        if (scheduler.getState().mode == view_name) {
            scheduler.setCurrentView(new Date(section.key), "day");
        }
    });

    scheduler.init('scheduler_here', new Date(2014, 5, 30), "timeline");
    scheduler.parse([
        {"id": "2", "start_date": "2014-06-30 12:00", "end_date": "2014-06-30 14:00", "text": "Section A test"},
        {"id": "3", "start_date": "2014-07-03 10:00", "end_date": "2014-07-06 11:00", "text": "Section B test"},
        {"id": "4", "start_date": "2014-06-30 16:00", "end_date": "2014-06-30 18:00", "text": "Section C test"},
        {"id": "5", "start_date": "2014-06-30 10:00", "end_date": "2014-06-30 15:00", "text": "Section D test"},
        {"id": "6", "start_date": "2014-06-29 12:00", "end_date": "2014-06-29 14:00", "text": "day before test"},
        {"id": "7", "start_date": "2014-07-01 12:00", "end_date": "2014-07-01 14:00", "text": "day after test"}], 'json');
}

Please suggest how to get rid from this issue.

Thank you

Hi,
code seems working ok when i try it locally. Can you attach a complete demo, with all js/css/html files, so i’ll be sure i’m running the same code as you?

Hi,

I was using older version of dhtmlxscheduler_timeline.js. it worked when I replaced with the new version

Thank you