Here is my code:
$(function () { $(\"#datepicker\").datepicker({ dateFormat: \'DD-MM-YY\' }); });
And the datetime picker is shown, but
Full example:
In jsp:
In script:
function datepicker() { $("#datepicker").datepicker({ showButtonPanel: true, dateFormat: 'yy-mm-dd', onSelect: function() { var dateObject = $('#datepicker').datepicker().val(); alert(dateObject); } } ); }