Moose
Moose

Reputation: 755

Bootstrap Datetime picker?

I am using bootstrap date time picker. my problem is my code isnt able to fetch Am/Pm. I have tried:

$('#datetimepicker6').datetimepicker({
        sideBySide: true,
        format: 'DD/MM/YYYY hh:mm tt'

    });

bUt this is only giving me, time as, 09:23 tt. it is showing tt in place of am and pm.

please help

Upvotes: 2

Views: 223

Answers (3)

Luke
Luke

Reputation: 1724

Try 'DD/MM/YYYY hh:mm a' instead, or '...A' for capital AM/PM.

http://momentjs.com/docs/#/displaying/

Upvotes: 3

Zee
Zee

Reputation: 8488

Try this:

 format: "DD/MM/YYYY HH:mm P",
 showMeridian: true

Upvotes: 2

ılǝ
ılǝ

Reputation: 3508

According to moment.js docs you can use 'DD/MM/YYYY h:mm:ss a'

Upvotes: 5

Related Questions