clockpicker icon indicating copy to clipboard operation
clockpicker copied to clipboard

12 Hour AM button doesn't work

Open stephenycchang opened this issue 10 years ago • 6 comments

Automatically outputs PM.

var input = $('#time'); input.clockpicker({ autoclose: true, twelvehour: true });

stephenycchang avatar Oct 29 '14 20:10 stephenycchang

I think there should not be an option 'twelvehour'. Instead, 'format' would be better. This way, we can support multiple formats, e.g. '10:00' or '10.00', and 'am/pm'. Use 'H:i' for 24-hour notation and 'h:i a' for 12-hour notation.

And of course, when setting the time when using 'AM/PM', it should be clear which hour is selected.

princeofnaxos avatar Nov 06 '14 08:11 princeofnaxos

The automatic PM is fixed here: https://github.com/weareoutman/clockpicker/pull/38

JordyMoos avatar Dec 03 '14 20:12 JordyMoos

Anyone has the same problem but in a modal dialog? When I click the AM/PM button the clockpicker get closed.

glrodasz avatar Feb 03 '15 20:02 glrodasz

I faced a similar problem when used in a modal. Setting autoclose:'true' solved only half of the problem. It takes pm by default

ChandanNadig avatar Mar 03 '15 14:03 ChandanNadig

Same here with the modal dialog and autoclose true. I saw someone use that and then provide a completely separate extra button outside of the clockpicker form to change it to AM/PM.

clay-morgan avatar Jan 21 '16 00:01 clay-morgan

@JordyMoos thank you big time, pal

JStrebeyko avatar Jan 24 '18 11:01 JStrebeyko