0

DHTMLX スケジューラを使用していますが、タイムライン ビューのみです。(タイムライン)日ごとのデフォルトが必要で、週と月のボタンがあります。初日は機能していますが、新しい更新をレンダリングするためのカスタム ボタンの構成に問題があります。Fiddle: http://jsfiddle.net/Ld9vZ/19/ デフォルトの 1 日のタイムライン:

// schedule visual settings
        scheduler.createTimelineView({
            name: "timeline",

            // x axis counting by minutes (minute, hour, day, week, month, year)
            x_unit: "minute",

            // 12 hour time format
            x_date: "%h:%i",

            // every 30 minutes
            x_step: 30,

            // lower the number, the wider the columns
            x_size: 24,

            // start at this time, 7:00 am
            x_start: 14,

            // doesn't seem to change
            x_length: 48,

            // y axis names
            y_unit: sections,
            y_property: "section_id",

            // render time as blue bar (bar, tree or cell)
            render: "bar"
        });

// default view is timeline format
        scheduler.init('scheduler_here', new Date(year1, month1, day1), "timeline");

新しいボタンを作成する方法

<div class="dhx_cal_tab" name="m_tab" style="right:280px;"></div>
scheduler.locale.labels.m_tab = "Month Timeline"

新しいオプションのセットを起動するには?

scheduler.createTimelineView({
                name: "mTimeline",
                x_unit: "month",
                x_date: "%h:%i",
                x_step: 1,
                x_size: 24,
                x_start: 14,
                y_unit: sections,
                y_property: "section_id",
                render: "bar"
            });

// month timeline
        scheduler.config.m_tab('scheduler_here', new Date(year1, month1, day1), "mTimeline");
4

1 に答える 1

1

タブ名と locale プロパティは、ビューの名前を使用する必要があります (タイムラインの場合、名前は config オブジェクトの 'name' プロパティで指定されます)。例: scheduler.locale.labels.mTimeline_tab = "Month Timeline ";

スニペットを確認してください: http://docs.dhtmlx.com/scheduler/snippet/e4a91ebe

月のタイムラインに 1 か月の日数を表示する場合は、月の日数が異なるため、タイムラインの追加設定が必要になります。これが実際の例です:

http://docs.dhtmlx.com/scheduler/snippet/3acdb725

于 2014-12-23T10:33:54.863 に答える