Here is my code:
$(function () { $(\"#datepicker\").datepicker({ dateFormat: \'DD-MM-YY\' }); });
And the datetime picker is shown, but
Setting the default format will solve the problem, this solution works for me while all above do not.
$.datepicker.setDefaults({ dateFormat: 'yy-mm-dd' });
Source: Datepicker: Adding dateFormat is giving an error