Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
[ask] ui datepicker in rowedit
28/11/2008
12:54
Avatar
madkixt
Member
Members
Forum Posts: 3
Member Since:
19/11/2008
sp_UserOfflineSmall Offline

hello advance.. can help me i have some problem with datepicker.

i use a jQuery UI Date Picker v3.0

in row edit i cant showing datepicker may be advance can help my problem 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");
});

01/12/2008
03:13
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Your error maybe is that you do not have tgl_kontrak as name,

but as index in the colModel

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.

01/12/2008
12:01
Avatar
madkixt
Member
Members
Forum Posts: 3
Member Since:
19/11/2008
sp_UserOfflineSmall Offline

Sorry… Advance

Your intention code this:

{name:’tgl’, index:’tgl_kontrak’, width:60, align:”left”,editable:true, editopitons:{size:30}}

Compared with this:

onInitializeForm: $(”#tgl_kontrak”).datepicker({dateFormat:”dd-mm-yy”,showOn:’focus’})
});

Could you explained and few suggestions from my code above…

thank you Advance…

madkixt

02/12/2008
04:03
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

You try to attach a datepicker to nonexisting element.

When the edit form is created the elements have the id taken from

colModel name - so if the name (and not the index - index is used

to perform sorting server side) is tgl then the id in form have the same

value - with other words to work this you should

$(”#tgl”).datepicker({...}) and not $(”#tgl_kontrak”).datepicker({..})

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.

02/12/2008
10:12
Avatar
madkixt
Member
Members
Forum Posts: 3
Member Since:
19/11/2008
sp_UserOfflineSmall Offline

Sorry Mr. Tony I has changed code I to

onInitializeForm: $ (”#tgl”) .datepicker ({dateFormat:”dd-mm-yy”,showOn:’focus’} ) });

but I still could not see datepicker...

Still there is one that is wrong with my code ???

please advance

02/12/2008
11:08
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

onInitializeForm: function(formid) {

$ (”#tgl”,formid) .datepicker ({

dateFormat:”dd-mm-yy”,showOn:’focus’}) ;

}

Regards

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
67 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information