Click here to Skip to main content
15,891,670 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Posted
Updated 9-Jan-18 16:39pm

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.
 
Share this answer
 
v2
Replace TextMode="Time" with TextMode="SingleLine". That will product a text input rather than a time input.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900