How To Use Custom Date Picker To Filter Data In Jqgrid
We have a custom date picker component in our application developed in javascript , I want to use this component to filter column values in jqgrid (i.e. I want it to replace data
Solution 1:
You want to get this picture's result? use bootstrap-datetimepicker.js resutl
I did this use code :
{name:'CREATE_DATE_TIME',label:'创建时间',sortable:true,align:'center',
searchoptions : {
dataInit: function (element) {
$(element).datetimepicker({
minView: 0,
language: 'zh-CN',
format: "yyyy-mm-dd" ,
todayBtn: 1,
autoclose: 1
});
},
}
you can use your date plugin in dataInit callback function。
Solution 2:
In all cases in order to get answer of your problem you will need to provide more information about this datepicker component - I mean detailed description of parameters, can this component be used with jquery bind function and etc.
By example you say
datePick("field_to_fill_with_date_picked", this,"form_name")
What mean field_to_fill_with_date_picked - is this id or the name in the form.
You may want to look at Guriddo jqGrid Knowledge Base and get idea how to trigger a search when selecting a date (using jQuery UI datepicker)
Post a Comment for "How To Use Custom Date Picker To Filter Data In Jqgrid"