62
Is it possible to format a date with jQuery UI Datepicker as to show hours, minutes and seconds?
This is my current mockup:
$(function() {
$('#datepicker').datepicker({ dateFormat: 'yyy-dd-mm HH:MM:ss' }).val();
});
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css">
<title>snippet</title>
</head>
<body>
<input type="text" id="datepicker">
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="https://code.jquery.com/ui/1.9.2/jquery-ui.min.js"></script>
When I call .datepicker({ dateFormat: 'yyy-dd-mm HH:MM:ss' }) the returned value is:
201313-07-03 HH:July:ss
Here is a JSFiddle.