PDA

View Full Version : [ask] datepicker in jqGrid



madkixt
11-28-2008, 07:00 PM
hello guru(s) and advance... please help me i have some problem with my datepicker in rowedit Jquery...

for information i use Jquery UI date picker V.3.0

my problem is :
i cant showing datepicker in form rowedit JqGrid...

this my code..


jQuery("#editgrid").jqGrid({
url:'selectkontrakkerja.php?q=1&rows=10',
datatype: "xml",
colNames:['ID Kontrak Kerja','No Proposal','Tgl Kontrak','Perusahaan','Project','Nilai Penawaran','Nilai Kontrak', 'Pembayaran','Termin'],
colModel:[
{name:'idp',index:'id_kontrakkerja', width:15,align:"center",search:false,editable:true,editoptions:{readonly:true,size:5,align:"center"}},
{name:'no_prop', index:'id_proposal', width:60, align:"left", editable:true, editoptions:{readonly:true,size:5}},
{name:'tgl', index:'tgl_kontrak', width:60, align:"left",editable:true, editopitons:{size:30}},
{name:'nm_per',index:'nm_client', width:90,editable:true,search:true,editoptions:{readonly:true,size:40}},
{name:'proj',index:'nm_project', width:60, align:"left",editable:true,editoptions:{readonly:true,size:40}},
{name:'nl_pen',index:'nilai', width:60, align:"left",editable:true,editoptions:{readonly:true,size:40}},
{name:'nl_kon',index:'nilai_kontrak', width:60, align:"left",editable:true,editoptions:{size:40}},
{name:'pembayaran',index:'pembayaran', width:60, align:"left",editable:true,edittype:"select",editoptions:{value:"1:Cash;2:Termin"}},
{name:'pembayaran',index:'pembayaran', width:60, align:"left",editable:true,edittype:"select",editoptions:{value:"1:30;2:60;3:90"}}
],
rowNum:10,
rowList:[10,20,30],
imgpath: 'themes/basic/images',
pager: jQuery('#pagered'),
sortname: 'id_kontrakkerja',
viewrecords: true,
sortorder: "desc",
width: 750, // new width
height: 220,
caption:"Kontrak Kerja",
editurl:'editkontrakkerja.php'
}).navGrid('#pagered',{edit:true,add:false,del:false});

$("#bedata").click(function(){
var gr = jQuery("#editgrid").getGridParam('selrow');
if( gr != null ) jQuery("#editgrid").editGridRow(gr,{height:280,reloadAfterSubmit:true,

onInitializeForm: $("#tgl_kontrak").datepicker({dateFormat:"dd-mm-yy",showOn:'focus'})
});
else alert("Please Select Row");
});



what wrong with my code advance... please help me thx...

madkixt
12-01-2008, 05:55 PM
up again

madkixt
12-01-2008, 06:05 PM
sorry advance can u help me....