I'm trying to follow this example in order to append the current time to my input
when a date is chosen with the datepicker
. According to the example, I should just be able to append my time string in the dateFormat
option:
$("#entry_date").datepicker({dateFormat: $.datepicker.W3C + date_obj_time});
However, in my test (fiddle here), the "M" in "AM" or "PM" is turning into the actual month name. For example, if I specify a date format such as this:
$("#DueDate").datepicker("option", "dateFormat", "mm/dd/yy 9:16 AM" );
I end up with this in my text field:
05/14/2013 9:16 A.May.
Is there a workaround for (or better way to do) this, or am I doing something blatantly wrong?