Forum


18:31

06/02/2009

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
11:16

06/02/2009

Thanks Murdoc,
My email: htantran@gmail.com
12:12

24/01/2009

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
13:02

12/02/2009

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!
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66