Format HTML5 Input Calendar with javascript

Asked

Viewed 527 times

0

I’m making a form with HTML5 validation and I came across a slightly bad situation when I put for example type="date" when I hover the mouse above, the "little arrows" appear to manipulate the date or ascend the calendar. The problem is that the formatting of it is horrible and I would like to know if there is no way I use or CSS or JAVASCRIPT to solve this problem.

 <input type="date" name="DtNascimento" required="required" 
oninvalid="setCustomValidity('Por favor, digite sua Data de Nascimento.')" 
onChange="try{setCustomValidity('')}catch(e){}">
  • There are some libraries that already provide you with better formatting like the bootstrap-datepicker, jquery and this.

  • I think I’ll use the Datepicker timer anyway then, but thank you so much anyway.

1 answer

1

  • Lucas I had already seen this datetimepicker but posted here to see if there really was a solution on top of this HTML5. Well, I guess I’ll just have to use javascript anyway.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.