Mr.Skellington
Mr.Skellington

Reputation: 11

Timepicker not working in IE but on everything else

having issues getting this to work in IE, I found that it runs perfectly in every other browsers. I know the easiest solution would be to just use a different browser, but this needs to run specifically in IE. Any help would be appreciated.

<div class="col-sm-4" style="text-align: left">
                    <asp:TextBox ID="txtTimeOn" Enabled="true" runat="server" Visible="False"></asp:TextBox>
                    <label for="lblTimeOn">Time On:</label>
                    <input type="time" class="form-control" id="TimeOn" name="TimeOn" />
                </div>
                <div class="col-sm-4" style="text-align: left">
                    <asp:TextBox ID="txtTimeOff" Enabled="true" runat="server" Visible="False"></asp:TextBox>
                    <label for="lblTimeOff">Time Off:</label>
                    <input type="time" class="form-control" id="TimeOff" name="TimeOff" />
                </div>

Upvotes: 0

Views: 66

Answers (2)

SoundWaves
SoundWaves

Reputation: 165

If you do a quick search there are many jQuery plug-in's that would help you.

Just as an observation in your code, you should be referencing the id of the textboxes in your label "for". This forces focus on the textbox if you click on the label.

<label for="lblTimeOn">Time On:</label>

Should be

<label for="idOfMyTextbox">Time On:</label> 

Welcome aboard!

Upvotes: 0

marpme
marpme

Reputation: 2435

Hey there and welcome to Stackoverflow 💪🏻

according to the documentation of MDN, IE does not support the usage of any input of type="time". Source from MDN / Source from CanIUse

Compatibility List for browsers

Upvotes: 1

Related Questions