Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML input type "time" not taking default value

Tags:

html

I'm trying to use an HTML input element with type="time", but I'm getting unexpected results. I have two of these on a page, one of them works and one does not.

<td>
    <input type="time" class="uk-input" value="7:30:00" name="timein[]"/>
</td>
<td>
    <input type="time" class="uk-input" value="16:00:00" name="timeout[]"/>
</td>

The first element will be rendered blank, why?

like image 660
GrumpyCrouton Avatar asked Sep 08 '25 01:09

GrumpyCrouton


1 Answers

2 digits per number. Just add a 0 in front of 7. the format is hh:mm:ss.

Here is doc.

<input type="time" class="uk-input" value="07:30:00" name="timein[]"/>
<input type="time" class="uk-input" value="16:00:00" name="timeout[]"/>
like image 81
Budyn Avatar answered Sep 10 '25 12:09

Budyn