Forum
Topic RSS
08:22
02/01/2009
OfflineWhen a datepicker is added to a column in a grid the column generates errors:
colModel date field entry:
{label: 'Date Added', name: 'DateAdded', index: 'DateAdded', width: 80,
sortable: false,
search: false,
edittype: 'text',
editable: true,
editrules: { date: true, minValue: 0 },
datefmt: 'dd-mmm-yyyy',
editoptions: { dataInit: function(elem) { $(elem).datepicker({ dateFormat: 'dd-mmm-yyyy' }); } }
},
-When the grid first starts it goes through $.fn.datepicker but doesn't go through _attachDatepicker: (ui.datepicker.js)
-When the dateAdded column is clicked on, it goes through $.fn.datepicker and does go through _attachDatepicker: At this point it generates an error.
-The next time it is clicked on it doesn't go throught _attachDatepicker. It tryes to split the value of the DateAdded field but the value is found to be empty even though there is something in it and it generates an error at grid.base.js line 1465.
-grid.common.js.function checkDate line 274 date = date.split(sep);
-Without editoptions: { dataInit: function(elem) { $(elem).datepicker({ dateFormat: 'dd-mmm-yyyy' }); } } in the dateAdded column options in colModel, there is no error when the column is clicked.
-the content of the field is filled via json from server as the grid opens and is “03-sep-2009″.
Perhaps someone has encoutered this issue in the past and can indicate what I am doing wrong.
09:47
Moderators
30/10/2007
OfflineHello,
Could you please tell me what is the text of the error?
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.
09:56
Moderators
30/10/2007
OfflineHello,
Mostley the error: Object doesn't support this property or method
tells that some modules are not loaded. Check if you have all the needed JS files loaded.
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.
10:35
02/01/2009
Offlinethese were included:
jquery.js,
js/grid.base.js,
grid.locale-en.js,
grid.common.js,
grid.custom.js,
grid.postext.js,
celledit.js,
MaskedInput.js,
ui.datepicker.js
then, at your suggestion, I added the following and tested after each addition:
jquery.fmatter.js,
grid.setcolumns.js,
grid.formedit.js,
grid.inlinedit.js,
jqModal.js,
The error presists.
the rest seem unlikely. Do you think any of these might solve the problem?
grid.import.js,
grid.subgrid.js,
grid.tbltogrid.js,
grid.treegrid.js,
jqDnR.js,
jquery.searchFilter.js,
JsonXml.js
10:48
Moderators
30/10/2007
OfflineHello,
Whch version of datepicker is this?
I feel that you use the old datepicker and the calling is not correct.
Just for thest in the same page could you please attach datepicker to element that is created manually from you.
something like
<inpud id='datepick'>
and then
$("#datepick").datepicker({ dateFormat: 'dd-mmm-yyyy' });
See the result.
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:07
02/01/2009
OfflineI used the same ui.datepicker.js file in other date text inputs on other pages and they work. This is the first time i've tried to use it in a jQgrid column.
However, I tried jquery-ui-1.7.1.custom.min.js direct from UI and the error persists.
and I tried to add a date field on the same page and that worked as expected.
11:14
Moderators
30/10/2007
OfflineHello,
Could you please provide a link?
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:19
Moderators
30/10/2007
OfflineHello,
Thanks I have it. Could you please send me th JS files used.
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.
Most Users Ever Online: 994
Currently Online:
35 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
Log In
Home