Reputation: 143
I have used the $('#start_time').timepicker({ timeFormat: 'hh:mm:ss tt' });
.
But it still showing the 24 hours format.
I need to show the 12 hours format in timepicker with AM and PM.
Thanks in advance.
Upvotes: 2
Views: 19847
Reputation: 6385
Its depends on which jquery plugin you are using.
@mangala, suggest also right. I want to add litle more, as I use
jquery.datetimepicker.js
Sample code is:
$("#start_time").datetimepicker({
datepicker:false,
format:'g:i A',
formatTime: 'g:i A',
mask:'29:59 99',
step:5,
ampm: true
});
It will helps you.
This will give output as
Upvotes: 4
Reputation: 143
Thanks friends i found issue.
That code should be like
$('#start_time').timepicker({
timeFormat: 'hh:mm:ss tt',
showSecond:true,
ampm: true
});
Upvotes: 6