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
Adding timepickr to Edit Form
06/10/2009
01:09
Avatar
markalanevans
California
New Member
Members
Forum Posts: 2
Member Since:
24/09/2009
sp_UserOfflineSmall Offline

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
                        }
                    }

06/10/2009
05:47
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

06/10/2009
11:24
Avatar
markalanevans
California
New Member
Members
Forum Posts: 2
Member Since:
24/09/2009
sp_UserOfflineSmall Offline

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

11/02/2010
19:03
Avatar
Cael
São Paulo - Brazil
Member
Members
Forum Posts: 6
Member Since:
11/02/2010
sp_UserOfflineSmall Offline

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.

11/02/2010
22:37
Avatar
Cael
São Paulo - Brazil
Member
Members
Forum Posts: 6
Member Since:
11/02/2010
sp_UserOfflineSmall Offline

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

12/02/2010
15:04
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Please refer here:

http://www.trirand.com/blog/?p.....8;search=1

Best 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.

12/02/2010
18:31
Avatar
Cael
São Paulo - Brazil
Member
Members
Forum Posts: 6
Member Since:
11/02/2010
sp_UserOfflineSmall Offline

Thanks Tony, that worked!

Cael

Forum Timezone: Europe/Sofia

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.com

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information