1
Good night, you guys!
I’m having a little trouble getting an effect on input type="date"
. I can do it normally in the input type="text"
(first print shows without the effect and the second shows with the effect), but in date
he keeps appearing the "dd/mm/aaaa"
below the text (as shown in the third print and the fourth with the effect). Is there any way to make it go away?
Code
Style:
.effect{
position: relative;
background-color: transparent;
}
.effect ~ .focus-border{
position: absolute;
margin-left: 44px;
bottom: 0; left: 50%;
width: 0;
height: 2px;
background-color: #4CAF50;
transition: 0.4s;
z-index: 2;}
.effect:focus ~ .focus-border,
.has-content.effect ~ .focus-border{
width: 80%; transition: 0.4s; left: 0;
}
.effect ~ h3{
position: absolute; margin-left: 44px; width: 100%; top: 8px; color: #aaa; transition: 0.3s; letter-spacing: 0.5px; cursor: default;
}
.effect:focus ~ h3, .has-content.effect ~ h3{
top: -16px; font-size: 12px; color: #4CAF50; transition: 0.3s;
}
Html:
<div class="col-3 input-effect-data">
<i class="fas fa-calendar-alt" id="fa" aria-hidden="true"></i>
<input type="date" class="effect" required>
<h3>Insira sua data de nascimento</h3>
<span class="focus-border"></span>
</div>
put the code of how it is doing, which helps the visualization of the problem
– Gabriel Gonçalves
I put the code, but I could not format right, I’m new here. I hope you can understand
– Giuseppe Nunes
This should help you https://answall.com/questions/298114/como-trocar-a-mascara-de-um-input-tipo-data/298132#298132
– hugocsl
Solved! Thank you very much!
– Giuseppe Nunes