0

スケジューラーで unitsview と weekview を使用しています。unitID(key)のヘッダーをクリックすると、別の関数に渡して日付を記入する必要がありますclassname: dhx_scale_bar。私はこのコードを試しました: CODE: SELECT ALL

function showTitle(a) {
    alert(a);
    debugger;
    var mode = scheduler.getState().mode;
    var myDate = scheduler.getState().date;
    alert(myDate);


    });
    if (mode == "units")
    {
        var hh= scheduler.getState().date;
        alert(hh);
        alert(mode);

    }
    else if (mode == "week" || mode=="decade") {

        var a = document.getElementById('resourcename');
        var cid = a.options[a.selectedIndex].value;
//here I get the unitId as i use list to filter_week.
        var n = scheduler.getState().date;
        alert(n);
// I get the same date(today's date) whenever i tried to click on any column in weekview or decade view
    }   
}

ヘッダーにイベントを添付するドキュメントが見つからないためshowTitle(a)、メインに関数を添付しました。dhtlmxscheduler.js助けてください。

4

1 に答える 1

0

getActionData APIを使用できます

var unit = scheduler.getActionData(e).section;

e - ネイティブ html クリック イベント オブジェクト

于 2013-10-16T14:29:51.207 に答える