Reputation: 4848
I have two javascript date pickers on my asp.net site:
When I click the from date picker, it looks like this:
As you can see, the calendar pop-up appears behind the next set of fields on the screen.
My question is, what can I do to make this control appear in front of (or, over, rather) the fields on the screen?
EDIT: Here is the code for this particular date picker:
<td rowspan="2" style="background-color: #A5C2FA; padding-left: 1px; text-align: center;">
<a onclick=" showCalendarControl(txtFromDate) " href="#">
<img src="../images/calendar.gif" style="height: 20px; width: 20px;" border="0" alt="Calendar" /></a>
</td>
And here is my CSS (I've added the z-index change for ui-datepicker, but it's doesn't appear to help):
<style type="text/css">
.body
{
background-color: #006699;
}
.outermost_body
{
background: White;
border-color: Black;
border-style: solid;
border-width: 2px;
height: 120px;
left: 10px;
position: absolute;
text-align: left;
top: 200px;
width: 700px;
}
.outermost_grid
{
height: 320px;
left: 10px;
position: absolute;
text-align: left;
top: 200px;
width: 500px;
}
.searchTable
{
background-color: #C9EAF3;
left: 5px;
padding: 1px;
position: absolute;
text-align: left;
top: 50px;
width: 700px;
z-index: 900;
}
.fieldcellText input
{
background-color: #D7E5F2;
border: 1px solid #284279;
color: #102132;
font: 11px Verdana, Geneva, Arial, Helvetica, sans-serif;
margin-left: 0px;
width: 150px;
}
.ui-datepicker
{
z-index: 999;
}
</style>
Upvotes: 0
Views: 1906
Reputation: 6996
z-index
works only on positioned elements
position:absolute
, position:relative
, or position:fixed
try this,
.ui-datepicker{
position: relative;
z-index: 1001;
}
Upvotes: 3
Reputation: 581
You should be able to set the z-index of the datepicker. Try adding this to the bottom of your css sheet.
.ui-datepicker {
z-index: 999;
}
Upvotes: 1