I am trying to format a jquery datepicker to display as Saturday, 18 May, 2013 but also have a second hidden field that would submit 2013-05-18 so I can use it in a MySQL query. I cannot seem to get it to work right. It keeps displaying as 05/18/2013. Here is my code.
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script type="text/javascript"></script>
<script>
$(function() {
$( "#datepicker" ).datepicker({
altField: "#alt-datepicker",
altFormat: "yy-mm-dd",
format: "DD, MM d, yy"
});
});
</script>
Date: <input type='text' id='datepicker' placeholder='Date'/><br />
<input type='hidden' id='alt-datepicker' name='AddHomeworkDate' />