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
This topic is locked No permission to create posts
sp_Feed Topic RSS sp_TopicIcon
datepicker imageButton not appearing
22/09/2009
09:32
Avatar
tim
Guest
Guests

Hi,

jqGrid 3.5.3

In cellEdit mode the imageButton for datepicker is not showing up:

{"sortable":true,"index":"contractDate","sorttype":"date","editoptions":{"size":8,dataInit:function(formID){$('#list',formID).datepicker({dateFormat:'mm/dd/yy',showOn:'button',buttonImage:'/css/images/calendar.gif',buttonImageOnly:true});}},"editrules":{"minValue":0,"date":true},"name":"contractDate","editable":true,"datefmt":"mm/dd/yyyy","width":120}

Notes:

* I have made sure there's enough room for the image in the cell by setting the editbox size to 8.

* I have set the z-index to 1200.

Please and Thanks for any Help.

tim

22/09/2009
09:34
Avatar
AdytmRO
Romania
Member
Members
Forum Posts: 24
Member Since:
16/09/2009
sp_UserOfflineSmall Offline

have you tried

buttonImage:'css/images/calendar.gif', ?

22/09/2009
09:45
Avatar
tim
Guest
Guests

yep.

- the file is in the right location.

- the file is accessible

-  I have taken the  inital “/” in and out and that fixes nothing.

-  everthing else works; only when I add:

   showOn:'button',buttonImage:'/css/images/calendar.gif',buttonImageOnly:true

the button doens't show.

tim

22/09/2009
10:28
Avatar
tim
Guest
Guests
22/09/2009
10:41
Avatar
AdytmRO
Romania
Member
Members
Forum Posts: 24
Member Since:
16/09/2009
sp_UserOfflineSmall Offline

http://www.blackstag.com/css/i.....lendar.gif it is ok

but if u look with firebug …

there are references to all the other pictures needed .. but no reference at calendar.gif.

try to delete dateFormat and see if it does anything or try to delete size:8

to see if there is something happening.

The thing is that the script it is not calling the picture, even if u told it to.

22/09/2009
10:44
Avatar
tim
Guest
Guests

I removed the dateFormat & size on my local copy of that example and it didn't change anything.

Thanks,

tim

22/09/2009
11:11
Avatar
tim
Guest
Guests

I created another example with just the datepicker using the same js files and it works.

http://www.blackstag.com/example.html

The only thing different is JqGrid, so It must be a problem with jqGrid.

Tony ? Any ideas ?

thanks,

tim

22/09/2009
11:45
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello

$(document).ready(function(){
jQuery("#list").jqGrid({
url: 'tree-json',
datatype:'json',
forceFit:true,
cellEdit:true,
cellsubmit:'remote',
cellurl: 'budget-handler',
treeGrid: true,
ExpandColumn:'thing',
colNames: ["NAMES","DATE"],
colModel: [{name: 'thing', index: 'thing', width: 220, hidden: false, sortable: false},
{name: 'myDate', index: 'myDate', width: 120, sortable:true, datefmt:"d/m/Y", editrules:{minValue:0, date:true},
editable:true, sorttype:"date", editoptions:{size:8, dataInit:function(elem){$('#list',elem).datepicker({dateFormat:'dd/mm/yy', showOn:'button', buttonImage:'css/images/calendar.gif', buttonImageOnly:true});}}}
],
height: 300,
width: 400,
imgpath: 'css/sunny/images',
caption: 'My Things!', <-------------- ERROR HERE
});

});

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.

22/09/2009
11:46
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Sorry It seems that posting sometime code is difficult

Check your code You have at last line

$(document).ready(function(){
jQuery("#list").jqGrid({
url: 'tree-json',
datatype:'json',
forceFit:true,
cellEdit:true,
cellsubmit:'remote',
cellurl: 'budget-handler',
treeGrid: true,
ExpandColumn:'thing',
colNames: ["NAMES","DATE"],
colModel: [{name: 'thing', index: 'thing', width: 220, hidden: false, sortable: false},
{name: 'myDate', index: 'myDate', width: 120, sortable:true, datefmt:"d/m/Y", editrules:{minValue:0, date:true},
editable:true, sorttype:"date", editoptions:{size:8, dataInit:function(elem){$('#list',elem).datepicker({dateFormat:'dd/mm/yy', showOn:'button', buttonImage:'css/images/calendar.gif', buttonImageOnly:true});}}}
],
height: 300,
width: 400,
imgpath: 'css/sunny/images',
caption: 'My Things!', <---- ERROR
});
});

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.

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

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

Adain

....
 width: 400,
imgpath: 'css/sunny/images',
caption: 'My Things!', <---ERROR HERE
});


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.

22/09/2009
11:50
Avatar
tim
Guest
Guests

I have removed the last ",".

Still no image.

tim

22/09/2009
12:06
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

You do:

$('#list',elem).datepicker(
Should be
$(elem).datepicker(...

Please befor posting this youi chack all the docs and you your code is error free
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.

22/09/2009
12:19
Avatar
tim
Guest
Guests

Hi Tony,

> "Please befor posting this youi chack all the docs and you your code is error free"

I am trying to.

I removed "#list", but I did have it that way once before - and it's worse.

Now without "#list" -  the editbox does not even open.

tim

22/09/2009
13:03
Avatar
AdytmRO
Romania
Member
Members
Forum Posts: 24
Member Since:
16/09/2009
sp_UserOfflineSmall Offline
try this 😀

{$(myDate)
.datepicker({dateFormat:'dd/mm/yy', showOn:'button',
buttonImage:'css/images/calendar.gif', buttonImageOnly
:true})
22/09/2009
13:07
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

when set showOn in datepicker it does not work. If you remove this option it will work. The problem is that the element is not inserted in the dom and datepicker does not know what to do - ie. where to put a image. Follow the solution of AdytmRO

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.

22/09/2009
13:44
Avatar
tim
Guest
Guests
* "{$(myDate).datepicker({dateFormat:'dd/mm/yy',... "

does not add the button image.

* Removing "showOn" does not add the button image.

None of these work...

"> when set showOn in datepicker it does not work.."

Are you saying there is no way to get this to work ?

tim









22/09/2009
17:19
Avatar
AdytmRO
Romania
Member
Members
Forum Posts: 24
Member Since:
16/09/2009
sp_UserOfflineSmall Offline

i will try to code a grid with datepicker and buton in the morning.

i will let you know if i managed to succesfully complete it.

22/09/2009
19:30
Avatar
tim
Guest
Guests

Thanks for helping.

I hope we can get this to work

timLaugh

23/09/2009
19:12
Avatar
tim
Guest
Guests

I've left the working example up so that others can benefit (includes re-setting the focus).

http://www.blackstag.com/json-example

tim

24/09/2009
03:16
Avatar
AdytmRO
Romania
Member
Members
Forum Posts: 24
Member Since:
16/09/2009
sp_UserOfflineSmall Offline

Sorry for not beying able to do the grid.

I;ve got lot of work to do ...

I have to do something like your grid today at work, but without date button (only date).

If i will do it .. i will try to implement the date button to see if it works.

I will post the code after i will do it.

This topic is locked No permission to create posts
Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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