gpt4 book ai didi

javascript - jquery datepicker 图标拉伸(stretch)

转载 作者:行者123 更新时间:2023-11-28 06:43:00 25 4
gpt4 key购买 nike

我似乎无法解决 jquery datepicker 图标变长的问题,它看起来像这样:

Stretched icon

当原始图标为17x17时像素,看起来像这样:

the actual png image

我通过 input 附上这张图片代码中的元素如下:

<input type="text" name="searchDate" id="searchDate" class="datePickerWithImage" cth:inputvalidate="Date" size="10" maxlength="10" tabIndex="14" title="Provide value for search date" />

还有 jquery日期选择器的功能是:

$( ".datePickerWithImage" ).datepicker({
showOn: "button",
showButtonPanel: true,
buttonImage: "/images/manageschedule.png",
dateFormat: 'yy/mm/dd',
buttonText: "Open calendar",
buttonImageOnly: true,
showWeek: true,
});

它在 css 中有一些额外的渲染提示:

.ui-datepicker-trigger {
margin-left:2px;
}

我似乎无法在 jquery api 中找到任何有用的东西,它看起来很奇怪,我真的很想修复它:)

编辑:在开发人员工具中,我可以看到元素为 <div id="ui-datepicker-div" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" style="position: absolute; top: 127.909px; left: 471.349px; z-index: 2; display: none;"> .. 但不确定这到底有多大帮助..

最佳答案

在你的风格中添加这个可能对你有帮助

input[type="text"].datePickerWithImage
{
width:17px;
height:17px;
}

关于javascript - jquery datepicker 图标拉伸(stretch),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34194831/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com