Forum


22:59

20/03/2009

Hi,
I'm trying to use the datepicker ui with a grid. My date picker always appears behind the modal form. I've reviewed a number of the posts on the site that this a zIndex issue. My question is how to fix this...
Using jquery ui version 1.7, and jqgrid version 3.4.2
1) Set the zIndex as a parameter - I can't seem to find any docs in regards to this parameter and the following code does not work:
}).navGrid('#hoursNav',{refresh:true,add:true,del:true,edit:false, search:false,},{},{height:280,reloadAfterSubmit:true,modal:true,onInitializeForm:function(formid){jQuery("#DATE",formid).datepicker({showOn: 'button', buttonImage: './css/artwork/calendar.gif', buttonImageOnly: true, zIndex:950})}},{reloadAfterSubmit:true});
2) Change the CSS file for ui.datepicker.
I've looked in this file and the only line that sets the zIndex is IE special case:
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
.ui-datepicker-cover {
display: none; /*sorry for IE5*/
display/**/: block; /*sorry for IE5*/
position: absolute; /*must have*/
z-index: -1; /*must have*/
filter: mask(); /*must have*/
top: -4px; /*must have*/
left: -4px; /*must have*/
width: 200px; /*must have*/
height: 200px; /*must have*/
}
Any help in solving this problem would be greatly appreciated.
Nathan
12:43

Moderators
30/10/2007

Hello,
In your head section after you load the datepicker css set
<style>
.ui-datepicker : {zIndex:1200;}
</style>
Edit:
The above code is wrong. We should as Nathan say:
<style>
.ui-datepicker {zIndex:1200;}
</style>
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.
14:49

Just FYI, I get an error:
Warning: Expected identifier for pseudo-class or pseudo-element but found ' '. Ruleset ignored due to bad selector.
Source File: http://www.devneq.org/index.ph.....ller/index
Line: 24
When I do that...
Thx
Martin
05:41

Moderators
30/10/2007

Hello Nathan,
Thanks for this fix. I update my post so that other can set it correct.
Best 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: 715
Currently Online:
71 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