我有日期控制,看起來像這樣。如何訪問數據綁定到元素的事件knockout.js
<div class="OnTheMoveFormTextBoxContainer">
<input data-bind="value: formatDateTime(ko.unwrap(Started)), css: { validationElement: validateItem(Started, 'Started') }, event: {
change: function(d, e) {
if (Started != $(e)[0].target.value && dateWheelShown == true) {
$data.Started(dateToISO($(e)[0].target.value,'DD/MM/YYYY HH:mm'));
}
}
}, id: 'Started' + '_' + Id()" data-onthemove_dateformat="DD/MM/YYYY HH:mm" class="Mobile_DateTimePick ui-input-text ui-body-c ui-corner-all ui-shadow-inset ui-mini" data-mini="true" name="Started" id="scoller1400844006695" readonly="">
</div>
我怎麼能訪問數據綁定事件處理程序knockout.js,我這個電流情況下onchange
。
我期待這樣的事情:ko.contextFor($($('.OnTheMoveFormTextBoxContainer')[3]).find('input')[0]).events
@CubedEye如何是重複的? –