I have this sample code:
<div id="calendar"></div>
$(document).ready(function() {
$('#calendar').datepicker({
dateFormat: 'yy-m-d',
inline: true,
onSelect: function(dateText, inst) {
var month = dateText.getUTCMonth();
var day = dateText.getUTCDate();
var year = dateText.getUTCFullYear();
alert(day+month+year);
}
});
});
When I run the code, there is an error. How to get this (date, month, year)
?