Forum


15:40

18/12/2008

hi all
I try to use datepicker for multiple toolbar search but get an error, firebug says
<div id="UserList" class="scroll" style="text-align:center;"></div>
<div id="pager" class="scroll" style="text-align:center;"></div>
(
function()
{
jQuery("#UserList").jqGrid
(
{
url:'users.getData.php',
datatype: 'xml',
mtype: 'GET',
colNames:['Actions', 'Name','E-mail', 'Creation Date', 'Order ID','Banned'],
colModel:[
{name:'act',index:'act', width:75,sortable:false, align:"center"},
{name:'Name',index:'Name', width:170, editable:true},
{name:'Email',index:'Email', width:170, editable:true},
{name:'CreationDate',index:'CreationDate', width:100, sorttype:"date"},
{name:'OrderID',index:'OrderID', width:150, align:"right"},
{name:'Banned',index:'Banned', width:50, align:"center", editable:true, edittype:"select", editoptions: {value:"0:No;1:Yes"}}
],
pager: jQuery('#pager'),
height: 280,
rowNum:10,
rowList:[10, 20,30,50,100],
sortname: 'CreationDate',
sortorder: "desc",
toolbar: [true, "top"],
viewrecords: true,
imgpath: 'js/themes/coffee/images',
loadComplete: function()
{
var ids = jQuery("#UserList").getDataIDs();
for(var i=0;i<ids.length;i++)
{
var cl = ids[i];
be = "<input style='height:22px;width:20px;' type='button' value='E' onclick=jQuery('#UserList').editRow("+cl+"); ></ids>";
se = "<input style='height:22px;width:20px;' type='button' value='S' onclick=jQuery('#UserList').saveRow("+cl+",CheckSuccess); />";
ce = "<input style='height:22px;width:20px;' type='button' value='C' onclick=jQuery('#UserList').restoreRow("+cl+"); />";
jQuery("#UserList").setRowData(ids[i],{act:be+se+ce})
}
},
editurl: "users.saveData.php",
caption: 'My first grid'
}
);
jQuery("#t_UserList").height(25).hide().filterGrid("UserList",{gridModel:true,gridToolbar:true});
jQuery("#sg_CreationDate").datepicker({dateFormat:"yy-mm-dd", showOn:'focus'});
jQuery("#UserList").navGrid('#pager',{edit:false,add:false,del:false,search:false,refresh:false})
.navButtonAdd("#pager",{caption:"Search",title:"Toggle Search",buttonimg:'js/themes/coffee/images/find.gif',
onClickButton:function(){
if(jQuery("#t_UserList").css("display")=="none") {
jQuery("#t_UserList").css("display","");
} else {
jQuery("#t_UserList").css("display","none");
}
}
});
}
);
03:06

Moderators
30/10/2007

Hello,
You should manually add the datepicker plugin and must be sure that it is loaded correctly. Add the plugin in head section of your html document.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
95 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66