Within the same container input text with display: block stretches to fill available space as expected but if I change type to 'date' it becomes shorter. Why?
HTML:
<div class="panel">
<div class="input-group">
<label for="text1">text1</label>
<input id="text1" type="text"/>
</div>
<div class="input-group">
<label for="date">date</label>
<input id="date" type="date" />
</div>
<div class="input-group">
<label for="text2">text2</label>
<input id="text2" type="text" />
</div>
</div>
CSS:
.panel {
display: flex;
flex-wrap: wrap;
}
.input-group {
flex-grow: 1;
text-align: left;
}
label, input {
display: block;
}
Result: text1 and text2 are the same size but date is shorter.