简体   繁体   English

KendoUI日期选择器输入字段显示问题

[英]KendoUI datepicker input field display issue

Hopefully what I provide here will be sufficient to assist me in a display issue I'm having. 希望我在这里提供的内容足以帮助我解决显示方面的问题。


You can see this in action at: http://dev.skoovy.com Username: test@test.com Password: test123 您可以在以下位置看到它的运行情况: http : //dev.skoovy.com 用户名: test@test.com 密码: test123

It's the form at the top of the page. 它是页面顶部的表单。 This is an in development site. 这是一个开发中的站点。


When I set up an input field to provide a datepicker, it changes the input field to contain this added area next to the calendar icon. 当我设置一个输入字段以提供日期选择器时,它将更改输入字段以在日历图标旁边包含此添加的区域。 I cannot find out why this is happening. 我不知道为什么会这样。

Here is what it looks like with datepicker initialized. 这是初始化日期选择器后的样子。 The areas highlighted with the red pen are what I'm trying to fix. 用红笔突出显示的区域是我要修复的区域。

使用datepicker初始化的输入字段

And, here is what it lookslike without datepicker initialized. 而且,这是没有初始化日期选择器的情况。

在此处输入图片说明

Here is the HTML as copied from the debugger pane in Chrome (via element selector) 这是从Chrome中的调试器窗格复制的HTML(通过元素选择器)

<div class="when_range_input" style="display: block;">
Start: <span class="k-widget k-datepicker k-header" style=""><span class="k-picker-wrap k-state-default"><input type="text" id="when_range_start" name="wv_drs" value="" data-role="datepicker" class="k-input" role="textbox" aria-haspopup="true" aria-expanded="false" aria-owns="when_range_start_dateview" aria-disabled="false" aria-readonly="false" aria-label="Current focused date is null" style="width: 100%;"><span unselectable="on" class="k-select" role="button" aria-controls="when_range_start_dateview"><span unselectable="on" class="k-icon k-i-calendar">select</span></span></span></span>
&nbsp;End: <span class="k-widget k-datepicker k-header" style=""><span class="k-picker-wrap k-state-default"><input type="text" id="when_range_end" name="wv_dre" value="" data-role="datepicker" class="k-input" role="textbox" aria-haspopup="true" aria-expanded="false" aria-owns="when_range_end_dateview" aria-disabled="false" aria-readonly="false" aria-label="Current focused date is null" style="width: 100%;"><span unselectable="on" class="k-select" role="button" aria-controls="when_range_end_dateview"><span unselectable="on" class="k-icon k-i-calendar">select</span></span></span></span>
</div>

Here is the css I'm using: 这是我正在使用的CSS:

.when_range_input {
    display:none;
    position:absolute;
    width:350px;
    /** margin-left:320px; **/
    border-color:#ffcc00;
    padding:5px;
    z-index:9999;
    font-size:11px;
    -webkit-box-shadow: 3px 3px 10px rgba(50, 50, 50, 0.55);
    -moz-box-shadow: 3px 3px 10px rgba(50, 50, 50, 0.55);
    box-shadow: 3px 3px 10px rgba(50, 50, 50, 0.55);
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    background-color:#ffffff;
}

.when_range_input input[type="text"] {
    background-color: #fff;
    border-color: #e2e2e2;
    border-style: solid;
    border-width: 1px;
    font-size: 11px;
    color: #b8b8b8;
    padding: 2px 1px 2px 1px;
    line-height: 15px;
    height: 20px;
}

You should change the max-width of the input field 您应该更改输入字段的最大宽度

.headersearch-flex-container .searchfld.flex-item:nth-child(2) input {
  width: 90px;
  max-width: 110px;
  min-width: 80px;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM