4
$(function () {
$("#datepicker").datepicker({
});
});
<body>
<form id="formu">
Nome:
<input type="text" id="name"><br>
Data de nascimento:
<input type="text" id="datepicker" name="data"/><br>
<input type="button" id="botton" value="Ok">
</form>
<div id="resultado"></div>
</body>
** user age. Next show in result div.**
Only one question
onSelect: function(date) {
is to perform this function from the moment the user selects the date this?– user49744
Yap, from the moment you click/press a date @user49744
– Miguel
What does it mean in this part of the code:
date.split('-')[2];
?– user49744
We divide the date by the '-' and fetch the last of the set (array) @user49744.
– Miguel
And why you put
$('#resultado').html('');
?– user49744
To insert into the div
#resultado
– Miguel