Loading JQuery DatePicker in the back of a textbox - css issue

I have a list of text boxes. I am using below code to load date picker at every location of textbox when textbox has focus. But if I click on the top text boxes, the data collector is loaded against the background of the text boxes, even if it starts from the text box with the button pressed. I think this is a css conflict between my css and ui's.

JavaScript:

<link type="text/css" href="JQUERY/development-bundle/themes/base/ui.all.css" rel="stylesheet" />

    function pickdate(dateflag,val)
      {
      $("#stdatepicker").datepicker({ dateFormat: 'yy-mm-dd' });
      }

      

HTML:

<div id="centrecontent">
<table>
  <tr><td>  <input type="text" id="enddatepicker0" name="Workeddate0" onfocus="pickdate(2,0)" /></td></tr>
</table>
</div>

      

I repeat this in the format of table rows. These lines are loaded into the div along with other text. So what I am missing here. How can I load the date picker above all divs and most of all text boxes. Thank you in advance.

Edit:

CSS

    div.#centrecontent
        {
         background-image:url("/images/bluecyan3.gif");
         background-repeat:no-repeat;
        }
        table
        {
                font-size:13px;
         font-family:arial;
        }
        div,p  {margin-top:0}/*clear top margin for mozilla*/
        * html #centrecontent {height:1%;margin-bottom:12px}/* combat IE 3 pixel jog */
        #centrecontent {position:relative;
`**EDIT** /*this is the culprit*//*z-index:1*/`}
        }
th
{
 background:url("/images/menubutton.jpg");
}

      

+2


source to share


1 answer


Do you have any styles applied to the textbox itself? Or in their containers? It is possible that the z-index of the textbox is very high for some reason. I think the z-index of the ui-datepicker should be higher. Maybe you can try this:



input{
  z-index:1;
}

      

+3


source







All Articles