KoGridのフィルターをカスタマイズして、「from-to」ロジックに基づいて日付データで列をフィルター処理できるようにしようとしています (フィルターを使用した KoGrid の例は、ここにあります)。私が望んでいたのは、適切なフィルター フィールドをクリックしたときに、Datepicker を使用した From と To の入力を含むダイアログを表示することです。
var vm = {
filterInfo: ko.observable(),
myObsArray: arr
};
ko.applyBindings(vm);
...
$("div.kgheadercell.col5").on("click", "input", function (event) {
$("#popup").dialog("open");
});
This however seems to be not working properly, i.e. the dialog is not being displayed once I click on the text field. However, if I try to input the last bit of the code in Chrome's console, the handler is correctly bound and the dialog appears once I click on the text field.
However, if I try
$("body").on("click", "input", function (event) {
$("#popup").dialog("open");
});
this successfully adds handler as I'm able to see the dialog when I click on any (obviously) text field.
Is there something happening after this code so that it removes or changes the handler?