this is my jquery code.eventdatpicker is display date only,but occasionStartTime and occasionEndTime it display 24 hours format only how to change this format to am/pm format?
$(function() {
$('#occasionStartTime').datetimepicker({
datepicker : false,
format : 'H:i'
});
$('#occasionEndTime').datetimepicker({
datepicker : false,
format : 'H:i'
});
$('#eventDatePicker').datetimepicker({
timepicker : false,
format : 'd.m.Y'
});
});
$('#StartDate').datetimepicker(
{
format: 'DD MMM YYYY hh:mm A'
});
where startDate is a divId
<div class="input-group date form_datetime" id="StartDate">
<input type="text" class="form-control input-lg" placeholder="From" name="StartDate" id="txtStartDate" required />
<span class="input-group-addon">
<span class="glyphicon-calendar glyphicon"></span></span>
</div>
This will give you format like: 25 Mar 2016 01:08 PM
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With