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
how can I integrate a datePicker to input form
04/03/2009
10:21
Avatar
jnavratil
Member
Members
Forum Posts: 23
Member Since:
12/02/2009
sp_UserOfflineSmall Offline

Using jquery 1.3.1, jqgrid 3.4.1, Firefox 3.0.6, Fedora 10 (64-bit)

I was able to get a date picker working within the grid, but not within the 'add' input form.  The code for the add is…

            navGrid(”#pager”,
                {refresh: true, edit: false, add: true, del: true, search: true},
                {beforeSubmit: function() { alert('before edit submit'); } }, // edit
                { // add
                beforeSubmit: function() { alert('before add submit'); return true;},
                onInitializeForm : function(formid) {

                                jQuery(”#invdate”,formid).datePicker({

                                dateFormat:”yymmdd”,
                                clickInput:true,
                                createButton:false,
                                startDate:'2000-01-02'}).
                        addClass('date-pick');    // Mark grid's date fields
                    }
                 },
                { // delete
                beforeSubmit: function() { alert('before delete submit'); }
                }
                );

Firebug tells me the input field on the add input form is….

<input id="invdate" class="FormElement dp-applied date-pick" type="text" name="invdate"/>

which is substantially similar to the working input of the grid…

<input id=”1_invdate class=”editable dp-applied date-pick type=”text style=”width: 98%; name=”invdate/>

The input behaves as if the event is not firing.  That is, clicking on the field performs no obvious action.  What am I doing wrong?

Thanks!

06/03/2009
01:10
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Check the z-index of datepicker. By default the z-index of the form is 950.

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.

06/03/2009
04:54
Avatar
limbiz
Member
Members
Forum Posts: 6
Member Since:
06/03/2009
sp_UserOfflineSmall Offline

Could you give more detail on how to intergrate UI datePicker to input form?

06/03/2009
12:06
Avatar
jnavratil
Member
Members
Forum Posts: 23
Member Since:
12/02/2009
sp_UserOfflineSmall Offline

Tony,

The z-index was it.  Thanks!

limbiz,

I'm not using the UI datePicker (spelled datepicker) but rather the plugin from http://www.kelvinluck.com/.&nbsp; No particular reason, it's just how I got started.  If that is what you want, look at his datePicker page (http://www.kelvinluck.com/asse.....r/v2/demo/)

The basic process is to call his datePicker (capital 'P') method for the input field to which you wish to attach the picker and add the '' class.  For example:

jQuery("#date").

datePicker({    dateFormat:"yymmdd",
        clickInput:true,
        createButton:false,
        startDate:'2000-01-02'}).

addClass('date-pick');    // Mark grid's date fields

Hope that helps.

06/03/2009
21:10
Avatar
limbiz
Member
Members
Forum Posts: 6
Member Since:
06/03/2009
sp_UserOfflineSmall Offline

Hi Tony,

Thanks for your quick response. I still can't make it works.
Could you provide some demonstations?

Regards,
LiM

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
44 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