Isengo Isengo - 5 months ago 24
jQuery Question

Datetimepicker not formatting

I am using the DTP (jQuery) and trying to format the time and date like this:

$('#datetimepicker').datetimepicker({
dateFormat: "yy-mm-dd",
timeFormat: "hh:mm:ss"

});


But it is always showing this format:

2016/06/15 13:20


Also tried ' instead of " - but nothing :/

Answer

Try this:

jQuery('#datetimepicker').datetimepicker({
  format:'yy-mm-dd hh:mm:ss'
});

Docs: http://xdsoft.net/jqplugins/datetimepicker/