I am currently using a datepicker in wordPress allowing the user to select a date. On submit, how can I change the current format of 'dd M yy' to something like 2015-01-28T00:00:00+00:00 so it can be submitted into a database later on. As well as check for validation, but I think this will be a different question.
Currently I have the following to declare the date picker :
// triggers the calendar to open.
$(document).ready(function() {
$('#deadline_date').datepicker({
dateFormat : 'dd M yy',
minDate: 0
});
});