howdylikes

Google Developersってわかりづらいよね

dhtmlXScheduler - 動的ローディング

動的ローディングについてのメモ

リファレンス : http://docs.dhtmlx.com/scheduler/loading_data.html#dynamicloading

scheduler.setLoadMode("month")
scheduler.load("data/events.php");

setLoadMode切り替えてURLを自動生成してくれるが普通にparse複数回呼べば良いような気がする。 (サーバーサイドでライブラリを使う場合、これに対応しているので使っても良いかもしれないが)

setLoadModeの引数は以下のパターンがある

URLがかわるだけ。(以下は2009/6/30が基準日) timeshiftは多分GMT±N分ってことだと思われます。

day : ~data1.json?timeshift=-540&from=2009-06-30&to=2009-07-03

week : ~data1.json?timeshift=-540&from=2009-06-29&to=2009-07-06

month : ~data1.json?timeshift=-540&from=2009-06-01&to=2009-08-01

year : ~data1.json?timeshift=-540&from=2009-01-01&to=2010-01-01

未指定 : ~data1.json?timeshift=-540

返却するレスポンスの形式

{
    "data": [
        {
            "start_date": "2009-06-30 09:40",
            "end_date": "2009-07-01 12:00",
            "text": "Task A-11111",
            "section_id": 1
        },
        {
            "start_date": "2009-06-30 10:40",
            "end_date": "2009-07-01 12:00",
            "text": "Task A-22222",
            "section_id": 2
        }
    ]
}

その他

ローディング表示 : scheduler.config.show_loading = true;