0
Good morning!
<datalist id="datalist">
<option value="08:00"></option>
<option value="08:30"></option>
<option value="09:00"></option>
</datalist>
<input list="datalist" class="form-control" type="time">
Following this code has occurred what I wish except for one thing, it adds an option by default "Other..." and I don’t want it to stay there... And I just can’t get it out, I tried to create this option with an id and try to remove it with javascript, but I couldn’t for anything... Does anyone know if you can take ?
If you need a non-exclusive list, why not use one
<select>
then?– Wallace Maxters
Because I’m manipulating this list a lot with javascript and I found it much easier to do this with datalist, but in case you don’t have the option "Other." I’ll have to redo a part of my code to be with a select.
– Matheus Alves
From what I see, both the
input[type=time]
as to thedatalist
, the behavior will vary from browser to browser. So maybe the solution is to use the good oldselect
.– Wallace Maxters
I’m finding that too, thanks for your help!
– Matheus Alves