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 datetimepicker to jqgrid
05/02/2009
18:31
Avatar
htantran
Member
Members
Forum Posts: 7
Member Since:
06/02/2009
sp_UserOfflineSmall Offline

Hi Tony,

I can see how good it is when you integrate ui.datepicker into inline edit as well as gird form.

My concern is that: it seems jqgrid does not integrate with ui.datetimepicker?

Question: how can I integrate a datetimepicker to jqgrid? If it's possible, would you give me a recommendation which library should I use for this? A demo will be extremely good.

Thanks,

Tan

05/02/2009
20:38
Avatar
murdoc
Member
Members
Forum Posts: 23
Member Since:
27/06/2008
sp_UserOfflineSmall Offline

I have the demo ,tell me your email, sent to you.

06/02/2009
11:16
Avatar
htantran
Member
Members
Forum Posts: 7
Member Since:
06/02/2009
sp_UserOfflineSmall Offline

Thanks Murdoc,

My email: htantran@gmail.com

12/02/2009
14:47
Avatar
jnavratil
Member
Members
Forum Posts: 23
Member Since:
12/02/2009
sp_UserOfflineSmall Offline

Would you mind sending the demo to me?

john(dot)navratil(at)sbcglobal(dot)net

13/02/2009
12:12
Avatar
kshfi
Member
Members
Forum Posts: 9
Member Since:
24/01/2009
sp_UserOfflineSmall Offline

I have used
http://www.kelvinluck.com/asse.....r/v2/demo/

You need

datePicker.css
date.js
calendar.png
query.datePicker.js

from that page. Ex. if you have edit line in grid then

… grid config:
onSelectRow: function(id, selected){
if(id && id!=lastsel){
jQuery('#navgrid').restoreRow(lastsel);
jQuery('#navgrid').editRow(id,true,fldevent);
lastsel=id;
}
},

// datepicker event
function fldevent(id){
// if you like to ui.datepicker
//jQuery(”#”+id+”_changedate”,”#navgrid”).datepicker(
//    {dateFormat:"yymmdd"});

// I like this - locale support and calendar popup only after click symbol:
$.dpText = {
HEADER_FORMAT : 'yyyy/mm',
TEXT_PREV_YEAR : 'Edellinen vuosi ',
TEXT_PREV_MONTH : 'Edellinen kk',
TEXT_NEXT_YEAR : 'Seuraava vuosi',
TEXT_NEXT_MONTH : 'Seuraava kk',
TEXT_CLOSE : 'Sulje',
TEXT_CHOOSE_DATE : 'Valitse pv'
}

// add special class to the grid's date fields (ex. changedate)
$(”#”+id+”_changedate”).addClass('date-pick');
// and bind the event to the class
$('.date-pick').datePicker();

}

Jukka

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

I was able to get this working within the grid, but not within the 'add' input form.  The code 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 is....

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

which is substantially similar to the working...

<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.  Clicking on the field performs no action.  Can you think of any reason why this works on the inline edit, but not in the form?

Thanks!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
45 Guest(s)

Currently Browsing this Page:
1 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