繁体   English   中英

禁用上下箭头

[英]Disable up and down arrow

我有此数据字段供输入

图片

它确实显示了一个数据选择器插件,该插件在键盘上可以正常工作。

但是我想禁用向上和向下箭头。 你能指导我如何吗?

还需要单击日期归档时打开日期选择器或当用户单击日历图标谢谢时。

码:

 <div class="col-sm-10"> <input type="date"ng-model="date" class="form-control" placeholder="date" style="width:180px" id="date" ng-required="true"> <span class="input-group-addon" style="width:auto"> <span class="glyphicon-calendar glyphicon"></span> </span> </div> <div class="col-sm-10"> <input type="date"ng-model="client.dateofbirth" class="form-control" placeholder="Data de nascimento" style="width:180px" id="dateofbirth" ng-required="true"> <span class="input-group-addon" style="width:auto"> <span class="glyphicon-calendar glyphicon"></span> </span> </div> 

日历图标还显示我不在正确的地方...当我单击文本框时,它会打开日历。

//不起作用

    $('#date').datepicker(
        {
            allowInputToggle: true

        });

从外观上看,输入看起来像是type="number" ,但是我不确定为什么那里有一个下拉箭头。 您可以使用CSS删除向上和向下箭头。 我总是将此片段添加到我的主要CSS / SASS文件中。

 input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; } input[type="number"] { -moz-appearance: test-field; } 
 <input type="number"/> 

来源: 关闭数字输入微调器| CSS-技巧

暂无
暂无

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

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