私は jqgrid を持っています:
jQuery("#list").jqGrid( {
url : 'ajax/get',
datatype : 'json',
mtype : 'POST',
colNames : [
'Date',
'ID'
],
colModel : [{
name : 'date',
index : 'date',
width : 60,
align : 'center',
searchoptions:{sopt:['gt', 'lt']}
},{
name : 'id',
index : 'id',
width : 40,
align : 'center',
searchoptions:{sopt:['eq']}
}]
//.......
});
「日付」列に「odata」オプションを設定する方法はありますか。現在、「大きい」と「小さい」が表示されています。「から」と「から」が必要です。
私はこれを試します:
colModel : [{
name : 'date',
index : 'date',
width : 60,
align : 'center',
searchoptions:{sopt:['gt', 'lt'], odata:['from', 'to']}
}
機能していませんが、「大きい」と「小さい」が表示されます。これを試しました:
$(document).ready(function(){
$.jgrid.search = {
odata : ['equal','not equal', 'to', 'less or equal','from','greater or equal', 'begins with','does not begin with','is in','is not in','ends with','does not end with','contains','does not contain']
};
$.extend($.jgrid.search);
});
すべての列で「大きい」を「から」に、「小さい」を「に」に置き換えますが、必要なのは「日付」列だけです。それを行う方法はありますか?
ありがとう。