I am using datetimepicker.js to select date and time of jquery. How do i change the time format from 12 hour clock to 24 hour clock?????
I am using datetimepicker.js to select date and time of jquery. How do i change the time format from 12 hour clock to 24 hour clock?????
You can try below code to get date in dd/mm/yyyy hh:mm AM/PM format using datetimepicker
For 24hour format use Capitalize letter like HH and for 12hour format use small letter like hh as given in below code snippet.
$('#element').datetimepicker(
{
format: 'DD/MM/YYYY hh:mm A'
}
);
Please vote answer if you find it useful for you. I am sure you will get it useful.
$(element).datetimepicker({
dateFormat: 'dd/mm/yy',
timeFormat: 'hh:mm TT',
showOn: "focus",
changeMonth: true,
changeYear: true
}).click(function () {
});