I am using the XDSoft Datetimepicker. I can choose a datetime, but when I click out of the input field, the hour of the time decrements by one hour. Here is an example:
This is when I pick a datetime (successfully):
And this is what is looks like immediately after choosing a datetime:
Finally, this is what it looks like when the input loses focus, i.e. when I click outside of the input:
Here is the javascript code that I use to set up the datetimepicker:
$("input[name='my_datetimepicker_input']").datetimepicker({
format: 'Y/m/d h:i A',
formatTime: 'g:i A',
minDate: '-1970/01/01',
step: 15,
maxTime: '22:00',
});
The problem doesn't seem to happen when I switch the format from 24 time to 12 hour (AM/PM) time.
Any ideas what could be causing this and how to fix this?