Forum


01:09

24/09/2009

I would like to use timepickr : http://haineault.com/media/jqu..... when using the form editor.
But for some reason it won't bind to the form field.
if i create another input text elsewhere on the page(ie not a part of the Modal Form) and give it an id of "testtime" and then ("#testtime").timepickr(); From within dataInit: ... The binding occurs... Its just not happening on the Edit Form.
Is there something i should know?
Current Code snippet, that doesn't work.
name:'time_start',
index:'time_start',
width:45,
editable:true,
editoptions:{
dataInit:function(el){
$(el).timepickr();
}
},
hidden:true,
editrules:{
edithidden:true
}
}
05:47

Moderators
30/10/2007

Hello,
Some plugins require that the element should be into the DOM in order to work correct.
Since dataInit is applied not when the element is into the DOM, this maybe will not work.
The same will be if you try to use a jQuery UI datepicker with the option to show a calendar image.
(I will see in other releases how to correct this "bug").
In order to resolve your problem I recommend you to use the onInitilazeForm event:
The code cal look like this:
onInitializeForm : function(formid)
{
$("#time_start",formid).timepickr();
}
Reagrds
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.
11:24

24/09/2009

Thanks Tony! That was exactly the isssue. I added the code like you said:
.navGrid(
'#s3pager',
{ edit:true,
add:false,
del:false,
search:false,
refresh:true,
toggle:false,
},{
editCaption:"Edit Event Details",
width:500,
jqModal:true,
closeOnEscape:true,
bSumbit:"Submit",
savekey:[true,13],
savekeys:[true,38,40],
onInitializeForm : function(formid){
$("#time_start",formid).timepickr();
}
}
)
And Voila! it worked.
Thanks so much!
-Mark
19:03

11/02/2010

Hi Tony
Is there any chance to add the timepickr plugin in "inline editing" mode? I may be wrong, but the onInitializeForm is only trigged when you're using the Edit Window – opened by a click in a nav button.
As I was using the inline cell editing, I thought it would be easier to check with you if there's any update on this issue.
22:37

11/02/2010

BTW, I was reading the documentation when I got the following [about the dataInit function]:
"(…) This is ideal way of attaching datepicker, timepicker and other."
As you have noticed in my last comment, it didn't work for me…
EDIT: I am using the latest version [3.6.3] w/ multiselect
Am I missing something here? Do you have any suggestion about using some plugins [timepicker, at least] in inline edit? Do you plan to add another function that gives the element already in the DOM?
Thanks and congrats for this amazing plugin.
Cael
15:04

Moderators
30/10/2007

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:
55 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