0
I am looking for a simple way to get the values of day, month and year separated from one input
of the kind date
, in jQuery.
$( "#ano" ).html($( "input[type=date]" ).val( ) );
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="date" value="2018-10-17">
<div id="ano"></div>
How do I get separate values without using split()
?
Why you have to add +1 in the month?
– Paulo Dos Santos
I put in answer friend.
– Sam
Thank you very much!
– Paulo Dos Santos