datepicker javascript的Onselect函数中的rows($(this).closest(“ tr”))。data()[0]始终为第一行

时间:2019-11-21 06:21:07

标签: javascript datepicker

    SELECT * FROM ORDER 
    WHERE  ROWNUM <= 200000000 AND (SUBSTR(CODE,1,10) = '1234423678');

$(".datePicker").datepicker({ maxDate: 0, format: "DD/MM/YYYY", changeMonth: true, changeYear: true, onSelect: function (dateText, inst) { $(this).closest("tr").addClass("selected"); var index = $(this).index(); alert("index is " + index); TransmittalResult.rows($(this).closest("tr")).data()[0].ReceivedOn = dateText; //TransmittalResult.rows(1).data()[0].ReceivedOn = dateText; SelectedData = TransmittalResult.rows([".selected"]).data().toArray(); if (SelectedData != null) { document.getElementById("saveReceiveDCC").disabled = false; } } }); 总是给出第一行,即使我们单击第二行

TransmittalResult.rows($(this).closest("tr")).data()[0].ReceivedOn = dateText;,而此行提供第二行数据,但由于文本框动态n = binding而不能使用

0 个答案:

没有答案