i am using jquery date picker the calendar icon trigger image near textbox is by default is on top i want to set the image size (height) same as textbox height please give
None of this worked for me. It appears that jQuery sets the height property of the image button when leaving the ready function. So if you try to set the height property in the ready function it gets overwritten to 26px. So I created a separate function to run in the onload event of the body tag. It updates the height property of the button to what I want like this:
// sample jQuery datepicker button tag:
var oDateCell = oTableRow.cells[2];
var sDateCellHTML = oDateCell.innerHTML;
var sRevisedHTML = sDateCellHTML.replace("height: 26px;", "height: 13px;");
oDateCell.innerHTML = sRevisedHTML;
I did some more work on this and I discovered that the code above has a bug. It causes the click event to fail and the calendar does not display when clicking the image. I don't know why, but I found a better way that does work. The method above was a clunky (lazy?) way of changing the style. The correct way is like this:
var oTableRow = oTable.rows[iRow];
if (oTableRow.cells.length > 2)
{
var oDateCell = oTableRow.cells[2];
if (oDateCell.childNodes.length > 1)
{
var oImage = oDateCell.childNodes[1];
oImage.style.height = "13px";
}
}