Forum

July 12th, 2025
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
Datepicker generates errors.
08/09/2009
08:22
Avatar
RobGMiller
Member
Members
Forum Posts: 42
Member Since:
02/01/2009
sp_UserOfflineSmall Offline

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

08/09/2009
09:47
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

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.

08/09/2009
09:51
Avatar
RobGMiller
Member
Members
Forum Posts: 42
Member Since:
02/01/2009
sp_UserOfflineSmall Offline

Thanks for your response Tony, 

"Object doesn't support this property or method"

Rob..

08/09/2009
09:56
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

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.

08/09/2009
10:35
Avatar
RobGMiller
Member
Members
Forum Posts: 42
Member Since:
02/01/2009
sp_UserOfflineSmall Offline

these 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

08/09/2009
10:48
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

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.

08/09/2009
11:07
Avatar
RobGMiller
Member
Members
Forum Posts: 42
Member Since:
02/01/2009
sp_UserOfflineSmall Offline

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

08/09/2009
11:14
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

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.

08/09/2009
12:07
Avatar
RobGMiller
Member
Members
Forum Posts: 42
Member Since:
02/01/2009
sp_UserOfflineSmall Offline

Perhaps a simple version of the file with the problem migth be more usefull to you?

I have emailed it to you. 

08/09/2009
12:19
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

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.

Forum Timezone: Europe/Sofia

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

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information