简体   繁体   English

隐藏的日历弹出窗口 <input type=“date”> 在Firefox中

[英]hide the calendar popup of <input type=“date”> in Firefox

In Firefox, input type="date" brings a calendar popup on click. 在Firefox中, input type="date"会在点击时弹出日历。 In Chrome, we can use ::-webkit-calendar-picker-indicator to hide the down arrow button showing the calendar. 在Chrome中,我们可以使用::-webkit-calendar-picker-indicator隐藏显示日历的向下箭头按钮。 Apart from preventing the default behavior on click, I haven't found a -moz pseudo-element equivalent to hide the calendar. 除了防止默认的单击行为外,我还没有找到等效的-moz伪元素来隐藏日历。 I don't want to use type='text' either. 我也不想使用type='text'

Is there any way to hide this popup calendar in Firefox? 有什么方法可以在Firefox中隐藏此弹出式日历吗?

If you have no event link to your input you can do : 如果您没有输入的事件链接,则可以执行以下操作:

$('#your-input').on('click', function(){
    return false;
});

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

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