Reputation: 421
I use asp Textboxes with TextMode='Time'
but it won't show the seconds correctly, especially when they are 00 and if there are some seconds you can't edit them because they are grayed out.
How can I set the textbox for accepting hh:mm:ss?
I tried a few things which didn't work, like:
<asp:TextBox runat="server" ID="tbDuration" TextMode="Time" format="HH:mm:ss" CssClass="elementsmall" />
I wanted to use TextMode so I do not need to control if the input is a time format.
Upvotes: 1
Views: 2758
Reputation: 460238
You can use the step
attribute:
<asp:TextBox runat="server" ID="tbDuration" TextMode="Time" step="1" format="HH:mm:ss" CssClass="elementsmall" />
That's not an ASP.NET- but HTML 5 attribute.
Upvotes: 3