我的 asp.net 网站上有两个 javascript 日期选择器:
当我单击起始日期选择器时,它看起来像这样:
如您所见,日历弹出窗口出现在屏幕上的下一组字段后面。
我的问题是,我该怎么做才能使这个控件出现在屏幕上的字段前面(或者,更确切地说,在上面)?
编辑:这是这个特定日期选择器的代码:
<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>
这是我的 CSS(我为 ui-datepicker 添加了 z-index 更改,但似乎没有帮助):
<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>