如何防止chrome和firefox在时间字段中添加掩码 [英] How to prevent chrome and firefox from adding mask to time field
问题描述
如何防止chrome和firefox在时间字段中添加掩码
我有aspx页面我有一个字段这是它的配置
< asp:TextBox ID =txtAddYearlyLeavsTimerunat =serverCssClass =TextBoxStylesNarrowTextMode = TimeValidationGroup =AddEmpValGr> 00:00< / asp:TextBox>
新版火狐和铬在字段中添加一个时间掩码我想阻止它们这样做
问题也与日期字段我使用我自己的日历控件和mensiond浏览器添加他们的日历控件阻止我使用我自己的控件
请指导我
我尝试了什么:
我不知道在哪里寻找解决方案
引用:如何防止chrome和firefox向时间字段添加掩码
简答:不要使用时间字段,替换为文本字段并自行处理所有内容。
浏览器可以自由地做任何想要得到的结果,它与日期或整数相同。
用替换 TextMode =Time
TextMode =SingleLine
。这将产生文本输入而不是时间输入。
how to prevent chrome and firefox from adding mask to time field
I have aspx page I have a field this is it's configuration
<asp:TextBox ID="txtAddYearlyLeavsTime" runat="server" CssClass="TextBoxStylesNarrow" TextMode="Time" ValidationGroup="AddEmpValGr">00:00</asp:TextBox>
the new version of fire fox and chrome adds a time mask to the field I want to prevent them from doing that
the problem also with date fields I use my own calendar control and the mensiond browsers adds their calendar control preventing me from using my own controls
please guide me
What I have tried:
I don't know where to look for solution
Quote:how to prevent chrome and firefox from adding mask to time field
Short answer: Don't use time field, replace with text field and handle everything yourself.
The browser is free to do anything it wants to get desired result, it is the same with date or integer.
ReplaceTextMode="Time"
withTextMode="SingleLine"
. That will product a text input rather than a time input.
这篇关于如何防止chrome和firefox在时间字段中添加掩码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!